--- id: 56533eb9ac21ba0edf2244d3 title: Comparison with the Strict Inequality Operator challengeType: 1 videoUrl: '' localeTitle: 与严格不等式算子的比较 --- ## Description
严格不等式运算符( !== )与严格相等运算符的逻辑相反。它意味着“严格不等于”并返回false ,其中严格相等将返回true反之亦然 。严格的不等式不会转换数据类型。 例子
3!== 3 //假
3!=='3'//是的
4!== 3 //是的
## Instructions
strict inequality operator添加到if语句,以便当val不严格等于17时,函数将返回“Not Equal”
## Tests
```yml tests: - text: testStrictNotEqual(17)应返回“Equal” testString: 'assert(testStrictNotEqual(17) === "Equal", "testStrictNotEqual(17) should return "Equal"");' - text: testStrictNotEqual("17")应返回“Not Equal” testString: 'assert(testStrictNotEqual("17") === "Not Equal", "testStrictNotEqual("17") should return "Not Equal"");' - text: testStrictNotEqual(12)应该返回“Not Equal” testString: 'assert(testStrictNotEqual(12) === "Not Equal", "testStrictNotEqual(12) should return "Not Equal"");' - text: testStrictNotEqual("bob")应返回“Not Equal” testString: 'assert(testStrictNotEqual("bob") === "Not Equal", "testStrictNotEqual("bob") should return "Not Equal"");' - text: 你应该使用!==运算符 testString: 'assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0, "You should use the !== operator");' ```
## Challenge Seed
```js // 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
```js // solution required ```