If you have any query feel free to chat us!
Happy Coding! Happy Learning!
In JavaScript, the typeof
operator is used to determine the type of a value or expression. The result of the typeof
operator is a string that indicates the data type of the value or expression.
The syntax of the typeof
operator is as follows:
csharpCopy code
typeof operand
Here, operand
can be any value or expression. The result of the typeof
operator is a string that represents the type of operand
.
The typeof
operator can be used with the following types of operands:
"undefined"
."object"
. This is a historical quirk of JavaScript, and is not actually correct.true
or false
), the result is the string "boolean"
."number"
."string"
."symbol"
."object"
.Here are some examples of using the typeof
operator:
javascriptCopy code
typeof undefined // "undefined"
typeof null // "object"
typeof true // "boolean"
typeof 42 // "number"
typeof "Hello" // "string"
typeof Symbol() // "symbol"
typeof {foo: 42} // "object"
typeof function(){} // “function”
Comments: 2
I am not able to access videos from second class and further. I have already completed first class
When will I get my course?
Now, Your query was resolved.