[英]Javascript what does <. undefined in console after console.log()
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
我想知道什么是
undefined
Every statement in JavaScript returns something. JavaScript中的每个语句都返回一些内容。
When you enter console.log(true),
true will be printed out and undefined
will be returned. 当您输入
console.log(true),
将输出true并返回undefined
。
undefined
is one of the seven types in JavaScript that means something has been declared but not assigned a value. undefined
是JavaScript中的七种类型之一,表示已声明某些内容但未为其赋值。
undefined
is the return value of console.log
statements. undefined
是console.log
语句的返回值。
It's the return value of the console.log
function. 它是
console.log
函数的返回值。 The true
that you see is a side-effect. 您所看到的
true
是有副作用的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.