HAP in scientist mode with lab equipment

Falsy Detector

Station 1 Demo

Test any value! Type something in the box below and click "Test" to see if JavaScript considers it truthy or falsy. Try the quick-test buttons to explore all 6 falsy values and some surprising truthy ones!

Test a Value

Try: "hello", 42, 0, null, undefined, NaN, "", []

Enter a value and click "Test" to see the result

Quick Test: The 6 Falsy Values

Click any button to test these falsy values:

Quick Test: Surprising Truthy Values

These look falsy but are actually truthy!

Robot ID Card Variables

See how HAP's new variables behave:

nickname = "" FALSY Empty string — no nickname set
backupBattery = 0 FALSY Zero — no backup power
secondaryMission = null FALSY Null — intentionally empty
energyLevel = 100 TRUTHY Non-zero number — has power!
robotName = "HyBit A. ProtoBot" TRUTHY Non-empty string — has a name