函数的定义 对象 类型转换

if(function y(){}){console.log(1)}
VM142:1 1
undefined
if(z){console.log(1)}
VM144:1 Uncaught ReferenceError: z is not defined
at <anonymous>:1:1
(anonymous) @ VM144:1
if(function y1(){}){console.log(y1)}
VM148:1 Uncaught ReferenceError: y1 is not defined
at <anonymous>:1:33
(anonymous) @ VM148:1
if(function y1(){}){console.log(typeof y1)}
VM168:1 undefined
undefined

 

 

 

函数的两种定义方式

 

 

 

posted @ 2018-03-09 22:53  papering  阅读(244)  评论(0编辑  收藏  举报