I was playing around with eval
and noticed that it can evaluate non-strings in Chrome, Firefox and Opera:
eval(Array) === Array; // true
eval(this) === this; // true
eval(4 * 3 / 2) === 6; // true
Is this a standard behavior? Is it documented anywhere? I can't find any mention of eval
taking anything other than a string argument.
If this isn't a standard behavior, can someone identify host environments where this doesn't work?