Type Checking
EasyAcc. 97.4%
+20 XP 5
Assuring Integrity
Users tend to accidently enter text inside phone number inputs easily. The typeof syntax allows robust protection scripts by properly checking any variable category explicitly.
The Assignment
- Query
typeofsafely on the assignedinputVal. - Give away
truespecifically only if the category stands as "boolean". Otherwise strictly false.
01EXAMPLE 1
Input
inputVal = trueOutput
trueExplanation: Boolean category accurately matched.
Constraints
- Use typeof keyword clearly.
- Always respond exclusively delivering a true or false result.
FundamentalsComparisonTypes
JavaScriptSystem handles I/O — write your function only
Loading...
5 Hidden
Input Arguments
inputValtrue
Expected Output
true
Click RUN to test your solution