var fn1 = function () { var a = 10; var b = function () { alert(123); }; var c = { name: "lazy", year: 1981 } }
var fn2 = function () { this.a = 10; this.b = function () { alert(123); }; this.c = { name: "lazy", year: 1981 } }
var fn3 = { a: 10, b: function (x) { alert(this.a + x); }, c: { name: "lazy", year: 1981 } }
问题:以上三种定义函数/对象的方式,有什么区别
stone310
堂堂堂堂糖糖糖童鞋
qq_光明_2
相关分类