Observe the following code:
var variable1 =5;
console.log(typeof variable1);
// Console Output:
"number"
Here, the typeof operator returns a string informing us the datatype of the variable.
Reference:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
var variable1 =5;
console.log(typeof variable1);
// Console Output:
"number"
Here, the typeof operator returns a string informing us the datatype of the variable.
Reference:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
No comments:
Post a Comment