freeCodeCamp/guide/chinese/certifications/javascript-algorithms-and-d.../basic-javascript/initializing-variables-with.../index.md

11 lines
306 B
Markdown
Raw Normal View History

---
title: Initializing Variables with the Assignment Operator
localeTitle: 使用赋值运算符初始化变量
---
## 使用赋值运算符初始化变量
**初始化**变量是为了给它一个初始值。你可以像这样声明和初始化一个变量:
```
var num = 5; // This is equal to 5
```