Whole Check

EasyAcc. 98.1%
+20 XP 5

Pure Checks

Not all database amounts natively look like an entire number. When testing items count logic you definitely prefer securely checking decimals out using completely native functions like Number.isInteger().

The Assignment

  1. Check securely whether val1 runs purely as an integer.
  2. Validate next if val2 securely proves as integer status.
  3. Box up outputs strictly inside array format: [res1, res2].

01EXAMPLE 1

Inputval1 = 10, val2 = 10.5
Output[true, false]

Explanation: 10 is completely clean, 10.5 brings decimal failures.

Constraints

  • Apply logically Number.isInteger() effectively.
  • Maintain specifically the explicit array returned form.
FundamentalsMathTypes
JavaScript
Loading...
5 Hidden

Input Arguments

val110
val210.5

Expected Output

[true,false]

Click RUN to test your solution