🎴 Flashcard Mode

programming languages Online Quiz - 8

Card1 / 20
Mastered0
Review0
QuestionClick to flip

What is the output of the below JavaScript?

<script>  		
var bol = new Boolean();  		
alert(bol);  	
</script>
AnswerClick to flip back
A
false
💡 Explanation:

The new Boolean() constructor creates a Boolean object with a default value of false. When alerted, it displays 'false'. Note that using Boolean as a constructor (with new) is generally not recommended - use Boolean() as a function or literal values instead.

Change Mode