Skip to content

Commit afec252

Browse files
nik-revmao-sz
andauthored
Update 15_totalIntegers/solution/totalIntegers-solution.js
Co-authored-by: MaoShizhong <[email protected]>
1 parent 99f8a40 commit afec252

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
@@ -2,7 +2,7 @@ const totalIntegers = function(obj, count = 0) {
22

33
if (typeof obj !== 'object' || obj === null) return;
44

5-
const elements = Array.isArray(obj) ? obj : Object.values(obj);
5+
const elements = Object.values(obj);
66

77
for (const el of elements) {
88
if (Number.isInteger(el)) ++count;

0 commit comments

Comments
 (0)