js执行后console自动返回undefined问题

转自:https://blog.csdn.net/smaj22521/article/details/26569255

每次console.log之后会自动输出个undefined,,,经询问居然是console.log这个函数自己的返回值,没有设置返回,所以默认值为undefined。

只chrome/safari这样webkit的浏览器才有。

后来发现alert(1)也会返回一个undefined,我推测系统带的这些函数都会有个返回值,如果没指定就返回undefined。

原文地址:https://www.cnblogs.com/qiansn/p/9265273.html