JavaScrip入门(3)

函数:

var m2=function(){
console.log('2222');
}

console.log(typeof(m2));

 

输出结果:test.html:31 function

 

jsp中的函数没有重载, 后者覆盖前者。

function m2(){
console.log('2222');
}
console.log(typeof(m2)+‘ ’+m2);

 

输出结果:

test.html:35 function function m2(){
console.log('2222');
}

 

posted @ 2016-08-17 20:31  讲义大魔王  阅读(112)  评论(0编辑  收藏  举报