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

2.0 KiB
Raw Blame History

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
56533eb9ac21ba0edf2244d2 Comparison with the Inequality Operator 1 与不等式算子的比较

Description

不等运算符( != )与等于运算符相反。它意味着“不等于”并返回false ,其中相等性将返回true 反之亦然 。与等式运算符一样,不等式运算符将在比较时转换数据类型的值。 例子
1= 2 //是的
1=“1”//假
1='1'//假
1= true // false
0= false // false

Instructions

if语句中添加不等式运算符!= ,以便当val不等于99时函数将返回“Not Equal”

Tests

tests:
  - text: <code>testNotEqual(99)</code>应返回“Equal”
    testString: assert(testNotEqual(99) === "Equal");
  - text: <code>testNotEqual(&quot;99&quot;)</code>应该返回“Equal”
    testString: assert(testNotEqual("99") === "Equal");
  - text: <code>testNotEqual(12)</code>应该返回“Not Equal”
    testString: assert(testNotEqual(12) === "Not Equal");
  - text: <code>testNotEqual(&quot;12&quot;)</code>应该返回“Not Equal”
    testString: assert(testNotEqual("12") === "Not Equal");
  - text: <code>testNotEqual(&quot;bob&quot;)</code>应返回“Not Equal”
    testString: assert(testNotEqual("bob") === "Not Equal");
  - text: 你应该使用<code>!=</code>运算符
    testString: assert(code.match(/(?!!==)!=/));

Challenge Seed

// Setup
function testNotEqual(val) {
  if (val) { // Change this line
    return "Not Equal";
  }
  return "Equal";
}

// Change this value to test
testNotEqual(10);

Solution

// solution required