Below is a simple code
var stop = true;
console.log(stop);
In console is show like this:
true
<. undefined // what this undefined, is it some reference.
I am wondering what is undefined
Every statement in JavaScript returns something.
When you enter console.log(true),
true will be printed out and undefined
will be returned.
undefined
is one of the seven types in JavaScript that means something has been declared but not assigned a value.
undefined
is the return value of console.log
statements.
It's the return value of the console.log
function. The true
that you see is a side-effect.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.