javascript - alert(new Boolean(false)) vs console.log(new Boolean(false)) -


i wonder why alert(new boolean(false)) prints false instead of printing object new boolean should return object. works should work if use console.log(new boolean(false))

alert() displays .tostring() value of argument passed it.

the tostring() value of boolean object either true or false.


Comments

Popular posts from this blog

methods - python can't use function in submodule -

Java 3D LWJGL collision -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -