摘要:
参数默认值,剩余参数,拓展参数(default spread rest parameter) 默认参数 let aa=(name='wwrs')= { console.log( ); } aa();//Hello wwrs aa('sss');//Hello sss 扩展参数 let bb=(a,b 阅读全文
摘要:
箭头函数(arrow function) 基本格式 let say333=()= { console.log("333");//333 } say333(); (name)= { console.log(name); } 调用一个小括号可以去掉 2个小括号就不能去掉 name= { console. 阅读全文
摘要:
扩展运算符(Spread operator) let zzz=[2,4,6]; console.log(zzz);//[2, 4, 6] console.log(...zzz);//2 4 6 展开并合并 let a=[1,2,3]; let b=[...a,4,5,6]; console.log( 阅读全文
摘要:
字面量(自变量) let name="wei"; let age=3; let obj={ //简写变量,等同于name:name name, age } console.log(obj.name)//wei let qqq = { name: 'wrs', toString () { // 'fu 阅读全文