Skip to content

Commit 0ad516b

Browse files
committed
feat(totalIntegers): define count as a variable using let in the body of the function
was not being passed to any function calls
1 parent f95b39c commit 0ad516b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

15_totalIntegers/solution/totalIntegers-solution.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const totalIntegers = function (obj, count = 0) {
1+
const totalIntegers = function (obj) {
2+
let count = 0;
23
const isObject = (value) => typeof value === 'object' && value !== null;
34

45
if (typeof obj !== 'object' || obj === null) {

0 commit comments

Comments
 (0)