Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | JavaScript Course Quiz 2 | Question 3

  • Last Updated : 10 May, 2019

What will be the result of the following code?




<script>
  document.write( true && 1 && 3);
</script>

(A) 0
(B) 1
(C) true
(D) 3


Answer: (D)

Explanation: The && (and operator) returns the last (right-side) value as long as the chain is “truthy” or True.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!