Form Checker
JavaScript
20 pts
Form Checker
Merhawi filled in a sign-up form. Some fields are empty. Use Boolean() to turn each value into true (filled) or false (empty):
hasNamefromfullNamehasAgefromagehasEmailfromemailhasAgeTextfromageText
Print exactly:
Name filled: true Age filled: false Email filled: false Age text filled: true
Notice the surprise: the number 0 is falsy, but the string "0" is truthy.
Checklist
- Create
hasNameandhasAge. - Create
hasEmailandhasAgeText. - Use
Boolean()for every value. - Print the four labelled lines.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
