Skip to content

Commit 6424862

Browse files
committed
Added test to point out NaN can't be checked for using ==
1 parent 333a7b3 commit 6424862

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

topics/about_numbers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ $(document).ready(function(){
1414
test("NaN", function() {
1515
var resultOfFailedOperations = 7/'apple';
1616
equals(isNaN(resultOfFailedOperations), __, 'what will satisfy the equals assertion?');
17+
equals(resultOfFailedOperations == NaN, __, 'is NaN == NaN?');
1718
});
18-
19+
1920
});

0 commit comments

Comments
 (0)