Web technologies Questions | JavaScript Course Quiz 2 | Question 9

What will be the output of the following code?

filter_none

edit
close

play_arrow

link
brightness_4
code

<script>
  let y = 1;
  y = typeof x; 
  document.write(typeof y);
</script>

chevron_right


(A) string
(B) null
(C) number
(D) boolean


Answer: (A)

Explanation: typeof ‘undefined’ is a string and if we do typeof ‘string’ again it will be the same.

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