What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-26 17:23:02
typeof in js
//typeof() will return the type of value in its parameters. //some examples of types: undefined, NaN, number, string, object, array //example of a practical usage if (typeof(value) !== "undefined") {//also, make sure that the type name is a str... Add solution -
C++ 2021-09-25 19:46:02
if else javascript
if (typeof myVar === 'string') { /* code */ }; Add solution