This content originally appeared on DEV Community and was authored by Coderslang: Become a Software Engineer
What's the output?
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
In JavaScript, the typeof
operator always returns a string.
So, even though typeof undefined
evaluates to undefined
, it’s a string and not the primitive undefined
value.
The string ’undefined’
is not equal to the value undefined
.
ANSWER: the message false
will appear in the console.
This content originally appeared on DEV Community and was authored by Coderslang: Become a Software Engineer
Coderslang: Become a Software Engineer | Sciencx (2021-05-13T12:57:04+00:00) JavaScript Interview Question #40: What is the type of `undefined` in JS?. Retrieved from https://www.scien.cx/2021/05/13/javascript-interview-question-40-what-is-the-type-of-undefined-in-js/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.