摘要: 1 x=function(){}2 x.a={}; //函数有属性????3 console.log(typeof x); //function4 console.log(typeof x.a); //object函数实际上是一个对象,每个函数都是Function类型的实例,而且都与其他引用类型一样具有属性和方法。 1 function sayName(name){ 2 alert(name); 3 } 4 function sum(num1,num2){ 5 return num1+num2; 6 } 7 function sayHi(){ 8 ale... 阅读全文
posted @ 2013-11-29 16:59 Western Journey 阅读(108) 评论(0) 推荐(0) 编辑