2020
10-10
10-10
JavaScript位置参数实现原理及过程解析
1.什么是位置参数?JavaScript:为什么命名参数比位置参数更好你一定很熟悉位置参数,即使你第一次听到这个名字。functiongreet(firstName,lastName){console.log(`Hello${firstName}${lastName}`);}//预期用法greet('Michael','Scott');constfName='Harry';constlName='Potter';greet(fName,lName);//错误用法constfirstName='Erlich';constlastName='Bachman';greet(lastName,firstName);...
继续阅读 >