Integer Verification
EasyAcc. 98.1%
+20 XP 5
Whole Units
Not all numbers are whole. Use Number.isInteger() to verify if a numeric value has a decimal component.
- Verify if
val1is an integer. - Verify if
val2is an integer. - Return the results in an array:
[res1, res2].
01EXAMPLE 1
Input
val1 = 10, val2 = 10.5Output
[true, false]Explanation: 10.5 is a float.
Constraints
- Use Number.isInteger().
- Return [boolean, boolean].
FundamentalsMathTypes
JavaScriptSystem handles I/O — write your function only
Loading...
9 Hidden
Input Arguments
val110
val210.5
Expected Output
[true,false]
Click RUN to test your solution