--- id: 56533eb9ac21ba0edf2244d3 title: Comparison with the Strict Inequality Operator challengeType: 1 videoUrl: https://scrimba.com/c/cKekkUy forumTopicId: 16791 localeTitle: Сравнение с оператором строгого неравенства --- ## Description
Оператор строгого неравенства ( !== ) является логической противоположностью оператора строгого равенства. Это означает «строго не равно» и возвращает false когда строгое равенство вернет true и наоборот . Строгое неравенство не будет преобразовывать типы данных. Примеры
3! == 3 // false
3! == '3' // true
4! == 3 // true
## Instructions
Добавьте strict inequality operator if чтобы функция вернула «Не равно», когда val строго не равно 17
## Tests
```yml tests: - text: testStrictNotEqual(17) should return "Equal" testString: assert(testStrictNotEqual(17) === "Equal"); - text: testStrictNotEqual("17") should return "Not Equal" testString: assert(testStrictNotEqual("17") === "Not Equal"); - text: testStrictNotEqual(12) should return "Not Equal" testString: assert(testStrictNotEqual(12) === "Not Equal"); - text: testStrictNotEqual("bob") should return "Not Equal" testString: assert(testStrictNotEqual("bob") === "Not Equal"); - text: You should use the !== operator testString: assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0); ```
## Challenge Seed
```js // Setup function testStrictNotEqual(val) { if (val) { // Change this line return "Not Equal"; } return "Equal"; } // Change this value to test testStrictNotEqual(10); ```
## Solution
```js function testStrictNotEqual(val) { if (val !== 17) { return "Not Equal"; } return "Equal"; } ```