Skip to content

Commit c19c1bc

Browse files
committed
feat/ clarify that we would normally use math.isnan
1 parent 15e4bec commit c19c1bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

14_contains/solution/contains-solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const contains = function(obj, searchValue) {
22
const values = Object.values(obj);
33

4-
// NaN !== NaN, so we would usually have to do an explicit check to test for it. However, Array.prototype.includes handles that for us
4+
// NaN !== NaN, so we would usually have to do an explicit check with Math.isNaN to test for it. However, Array.prototype.includes handles that for us
55
if (values.includes(searchValue)) return true;
66

77
const nestedObjects = values.filter((value) => typeof value === 'object');

0 commit comments

Comments
 (0)