---
id: 56533eb9ac21ba0edf2244a9
title: Initializing Variables with the Assignment Operator
challengeType: 1
videoUrl: ''
localeTitle: Inicializando Variáveis ​​com o Operador de Atribuição
---

## Description
<section id="description"> É comum <dfn>inicializar</dfn> uma variável com um valor inicial na mesma linha que é declarada. <code>var myVar = 0;</code> Cria uma nova variável chamada <code>myVar</code> e atribui a ela um valor inicial de <code>0</code> . </section>

## Instructions
<section id="instructions"> Defina uma variável <code>a</code> com <code>var</code> e inicialize-a com um valor de <code>9</code> . </section>

## Tests
<section id='tests'>

```yml
tests:
  - text: Inicialize <code>a</code> para um valor de <code>9</code>
    testString: 'assert(/var\s+a\s*=\s*9\s*/.test(code), "Initialize <code>a</code> to a value of <code>9</code>");'

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='js-seed'>

```js
// Example
var ourVar = 19;

// Only change code below this line

```

</div>


### After Test
<div id='js-teardown'>

```js
console.info('after the test');
```

</div>

</section>

## Solution
<section id='solution'>

```js
// solution required
```
</section>
