freeCodeCamp/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.chinese.md
Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

1.1 KiB

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
56533eb9ac21ba0edf2244a9 Initializing Variables with the Assignment Operator 1 使用赋值运算符初始化变量

Description

通常将变量初始化为与声明的同一行中的初始值。 var myVar = 0;创建一个名为myVar的新变量,并为其指定初始值0

Instructions

使用var定义变量a并将其初始化为值9

Tests

tests:
  - text: 将<code>a</code>初始化为值<code>9</code>
    testString: assert(/var\s+a\s*=\s*9\s*/.test(code));

Challenge Seed

// Example
var ourVar = 19;

// Only change code below this line

After Test

console.info('after the test');

Solution

// solution required