Home » HTML » Html miscellaneous » Question
  1. What is the Boolean value of “” in JavaScript?
    1. false
    2. off
    3. on
    4. true
    5. None of these
Correct Option: A

For an empty string (“”), the Boolean value is false. E.g. var t= “ ”; Boolean(t); //it will return false. For -0(minus zero), the Boolean value is false. The Boolean value of undefined is also false. For null and false the Boolean value is also false.



Your comments will be displayed only after manual approval.