--- id: 56533eb9ac21ba0edf2244a9 title: Initializing Variables with the Assignment Operator challengeType: 1 --- ## Description
It is common to initialize a variable to an initial value in the same line as it is declared. var myVar = 0; Creates a new variable called myVar and assigns it an initial value of 0.
## Instructions
Define a variable a with var and initialize it to a value of 9.
## Tests
```yml tests: - text: Initialize a to a value of 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 var a = 9; ```