摘要:
一、主要区别 1、{} 和 new Object() 除了本身创建的对象,都继承了 Object 原型链上(Object.prototype)的属性或者方法,eg:toString();当创建的对象相同时,可以说 {} 等价于 new Object() 。2、Object.create() 是将创建 阅读全文
posted @ 2022-05-06 15:18
musicBird
阅读(2354)
评论(0)
推荐(0)
摘要:
一、写法不一样 1 //函数声明 2 let res1 = sum1(10 , 20) 3 console.log(res1) 4 function sum1(num1, num2) { 5 return num1 + num2 6 } 7 8 //函数表达式 9 let res2 = sum2(1 阅读全文
posted @ 2022-05-06 11:46
musicBird
阅读(219)
评论(0)
推荐(0)

浙公网安备 33010602011771号