Web technologies Questions | JavaScript Course Quiz 2 | Question 7

What will be the output of the following code?

filter_none

edit
close

play_arrow

link
brightness_4
code

<script>
  let ans = 1;
  document.write( ans === '1');
</script>

chevron_right


(A) true
(B) false
(C) 0
(D) None of the above


Answer: (B)

Explanation: The strict equality operator compares both the value and the type of the operands.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.

About immukul

Executive Software Developer at Cavisson Systems