Today I saw strange behavior when I typed window.close
, showing function close() { [native code] }
in IE and function () { [native code] }
in chrome, I thought both functions.
But when I typed typeof(window.close)
, it showed 'object'
in IE8 and 'function'
in chrome.
Why is this a different behavior? What methods can I use to check the type of a variable in JavaScript? Are there other features that show this type of behavior?
thanks
Anoop source
share