Declare JavaScript 常量
填空题 入门
题目
Fill in 空白到 declare 常量 named `MAX_SIZE` 使用值 100.
代码
___ MAX_SIZE = 100;
提示
Use keyword for constants.
解释
const is the correct keyword for a value that should not change. The completed line is: const MAX_SIZE = 100;. By convention, constants that represent configuration values often use UPPER_SNAKE_CASE naming.
相关资源
相关课程
- JavaScript 变量
学习关于 let, const, and var in JavaScript.
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。