object type in javascript code example
Example 1: js typeof number
console.log(typeof 93);
console.log(typeof 'Maximum');
console.log(typeof false);
console.log(typeof anUndeclaredVariable);
Example 2: creating an object javascript
let obj = {
name:"value",
num: 123,
foo: function(){}
}
Example 3: create object javascript
const object = {
something: "something";
}
Example 4: check data type in js
var x = "Hello World";
typeof x;
Example 5: javascript object
let names = {
name1: 'What ever you want to put'
}
Example 6: objects in javascript
let name = {
name1: 'mark'
}