Write Higher Order Arrow Functions: 'hint' answer is confusing

The negatives are removed by num > 0

Now,
num % parseInt(num) === 0

Let’s use the number 5.2
5.2 % parseInt(5.2) === 0
parseInt makes an integer of whatever is inside it
5.2 % 5 === 0
0.2 === 0
false

Or with a number like 6
6 % parseInt(6) === 0
6 % 6 === 0
0 === 0
true

Yes, it would work the same and be easier to understand with num % 1 === 0 but the result is the same

2 Likes