Open In App

Aptitude | JavaScript Course Quiz 3 | Question 8

Like Article
Like
Save Article
Save
Share
Report issue
Report

What will be the output of the following code?




<script>
document.write(( true + false ) > 2 + true );
</script>


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


Answer: (B)

Explanation: Here, True will change to 1, and False to 0.
Hence, (1+0)>(2+1) => 1>3 is False.

Quiz of this Question


Last Updated : 10 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads