19

写出优雅的js代码

 5 years ago
source link: https://juejin.im/post/5bf6629fe51d454f677c2f6d
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一.常量相关 1.定义常量 var a=1; // 错误:"var"定义的"常量"是可变的,在声明一个常量时,该常量在整个程序中都应该是不可变的。 正解: const a=1 2.给常量赋值 let lastName = fullName[1]; // 错误:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK