[英]Javascript what does <. undefined in console after console.log()
下面是一個簡單的代碼
var stop = true;
console.log(stop);
在控制台中顯示如下:
true
<. undefined // what this undefined, is it some reference.
我想知道什么是undefined
JavaScript中的每個語句都返回一些內容。
當您輸入console.log(true),
將輸出true並返回undefined
。
undefined
是JavaScript中的七種類型之一,表示已聲明某些內容但未為其賦值。
undefined
是console.log
語句的返回值。
它是console.log
函數的返回值。 您所看到的true
是有副作用的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.