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.7 KiB
Raw Blame History

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
56533eb9ac21ba0edf2244ac Increment a Number with JavaScript 1 使用JavaScript增加数字

Description

您可以轻松地增加或添加一个变量与++运算符。 i++;相当于i = i + 1; 注意
整行成为i++; ,消除了对等号的需要。

Instructions

更改代码以在myVar上使用++运算符。 暗示
了解有关算术运算符的更多信息- 增量(++

Tests

tests:
  - text: <code>myVar</code>应该等于<code>88</code>
    testString: assert(myVar === 88);
  - text: <code>myVar = myVar + 1;</code>应该改变
    testString: assert(/var\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code));
  - text: 使用<code>++</code>运算符
    testString: assert(/[+]{2}\s*myVar|myVar\s*[+]{2}/.test(code));
  - text: 不要更改行上方的代码
    testString: assert(/var myVar = 87;/.test(code));

Challenge Seed

var myVar = 87;

// Only change code below this line
myVar = myVar + 1;

After Test

console.info('after the test');

Solution

// solution required