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

  1. Query typeof safely on the assigned inputVal.
  2. Give away true specifically only if the category stands as "boolean". Otherwise strictly false.

01EXAMPLE 1

InputinputVal = true
Outputtrue

Explanation: Boolean category accurately matched.

Constraints

  • Use typeof keyword clearly.
  • Always respond exclusively delivering a true or false result.
FundamentalsComparisonTypes
JavaScript
Loading...
5 Hidden

Input Arguments

inputValtrue

Expected Output

true

Click RUN to test your solution