Single Choice Not Set

QWhat is the result of the following code?
console.log(true && false);

ID: #4863 JavaScript Operator MCQ 313 views
Question Info
#4863Q ID
Not SetDifficulty
JavaScript Operator MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A true
  • B false
  • D 1
Correct Answer

Explanation

The result of the code is false.
The && operator in JavaScript performs a logical and operation, which means that it returns true only if both operands are truthy.
In this case, the first operand is truthy (true), but the second operand is false then the result is also false

Share This Question

Challenge a friend or share with your study group.