Noticed something peculiar while coding a project this week...some unexpected behavior that took me an embarrassingly long time to figure out.
var a = global.get('this_doesnt_exist'); // returns null as it is doesn't exist, no error thrown
var a = global.get('this_doesnt_exist.something'); // object member access: still returns null as it is doesn't exist, no error thrown
var a = global.get(['this_doesnt_exist']); // returns [null] as it is doesn't exist, no error thrown
var a = global.get(['this_doesnt_exist.something']); // "ReferenceError: value is not defined"
I would expect the last line to return Array size of 1, containing null, similar to line #2. Is this intended or a bug? Thanks in advance.