docs for firefox , IE
Intended behavior: you can pass a pointer to a function or string as the first argument.
Regarding this, JS is a scripting language, so string evaluation for some interpreted code (e.g. eval does) is what it is very good at.
edit: I meant "very good" in the context of the fact that it is a scripting language used to parse strings for working code, as Jimbo Jonny points out; this can be avoided.
source share