--- id: 56533eb9ac21ba0edf2244a9 title: Initializing Variables with the Assignment Operator challengeType: 1 videoUrl: '' localeTitle: 使用赋值运算符初始化变量 --- ## Description
通常将变量初始化为与声明的同一行中的初始值。 var myVar = 0;创建一个名为myVar的新变量,并为其指定初始值0
## Instructions
使用var定义变量a并将其初始化为值9
## Tests
```yml tests: - text: 将a初始化为值9 testString: 'assert(/var\s+a\s*=\s*9\s*/.test(code), "Initialize a to a value of 9");' ```
## Challenge Seed
```js // Example var ourVar = 19; // Only change code below this line ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```