Open In App

Web technologies Questions | JavaScript Course Quiz 2 | Question 9

What will be the output of the following code?




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

(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

Article Tags :