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
56533eb9ac21ba0edf2244d3 Comparison with the Strict Inequality Operator 1 与严格不等式算子的比较

Description

严格不等式运算符( !== )与严格相等运算符的逻辑相反。它意味着“严格不等于”并返回false ,其中严格相等将返回true 反之亦然 。严格的不等式不会转换数据类型。 例子
3== 3 //假
3=='3'//是的
4== 3 //是的

Instructions

strict inequality operator添加到if语句,以便当val不严格等于17函数将返回“Not Equal”

Tests

tests:
  - text: <code>testStrictNotEqual(17)</code>应返回“Equal”
    testString: assert(testStrictNotEqual(17) === "Equal");
  - text: <code>testStrictNotEqual(&quot;17&quot;)</code>应返回“Not Equal”
    testString: assert(testStrictNotEqual("17") === "Not Equal");
  - text: <code>testStrictNotEqual(12)</code>应该返回“Not Equal”
    testString: assert(testStrictNotEqual(12) === "Not Equal");
  - text: <code>testStrictNotEqual(&quot;bob&quot;)</code>应返回“Not Equal”
    testString: assert(testStrictNotEqual("bob") === "Not Equal");
  - text: 你应该使用<code>!==</code>运算符
    testString: assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0);

Challenge Seed

// Setup
function testStrictNotEqual(val) {
  // Only Change Code Below this Line

  if (val) {

  // Only Change Code Above this Line

    return "Not Equal";
  }
  return "Equal";
}

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

Solution

// solution required