It is rather a matter of "experience from the trenches."
Given this javascript snippet
function (foo) {
I am trying to cut it; according to MDN , it should be ok to write:
function (foo) { var bars = (foo && foo.bars) || [];
I missed a case (a set of values ββor another browser), where does this not work? Is there a shorter / cleaner way to do this?
In a more subjective node, do you find this impossible to read?
thanks
source share