Skip to content

Commit 3efb3f9

Browse files
nik-revJoshDevHub
andauthored
feat(totalIntegers): use helper function instead of inlining logic
Co-authored-by: Josh Smith <[email protected]>
1 parent 99ebb57 commit 3efb3f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

15_totalIntegers/solution/totalIntegers-solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const isObject = (value) => typeof value === 'object' && value !== null;
44
const totalIntegers = function (obj) {
55
let count = 0;
66

7-
if (typeof obj !== 'object' || obj === null) {
7+
if (!isObject(obj)) {
88
return;
99
}
1010

0 commit comments

Comments
 (0)