Am not new to JS or its syntax, but sometimes, the semantics of the language has me stumped at times. At work today, a colleague mentioned this:
var a = b =
Your colleague is right:
var a = b = []; a.push('something'); console.log(b); // outputs ["something"]
but:
var a = [], b = []; a.push('something'); console.log(b); // outputs []