!==
) هو المقابل المنطقي للمشغل الصارم للمساواة. ويعني "عدم التساوي في الدقة" ويعود false
حيث تعود المساواة الصارمة إلى true
والعكس صحيح . عدم المساواة الصارمة لن تقوم بتحويل أنواع البيانات. أمثلة 3! == 3 // false
3! == '3' // true
4! == 3 // صحيح
strict inequality operator
إلى العبارة if
بحيث تقوم الدالة بإرجاع "غير مساوي" عندما لا يكون val
مساوياً تمامًا لـ 17
testStrictNotEqual(17)
إرجاع "مساواة"
testString: 'assert(testStrictNotEqual(17) === "Equal", "testStrictNotEqual(17)
should return "Equal"");'
- text: testStrictNotEqual("17")
"غير مساوي"
testString: 'assert(testStrictNotEqual("17") === "Not Equal", "testStrictNotEqual("17")
should return "Not Equal"");'
- text: يجب أن testStrictNotEqual(12)
"غير مساوي"
testString: 'assert(testStrictNotEqual(12) === "Not Equal", "testStrictNotEqual(12)
should return "Not Equal"");'
- text: testStrictNotEqual("bob")
"غير مساوي"
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");'
```