how to read object properties in javascript code example
Example 1: creating an object javascript
let obj = {
name:"value",
num: 123,
foo: function(){}
}
Example 2: how to a property from a JavaScript object
delete myObject.regex;
delete myObject['regex'];
var prop = "regex";
delete myObject[prop];
var myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI",
"regex": "^http://.*"
};
delete myObject.regex;
console.log(myObject);
Example 3: how to create a object in javascript
var about = {
name:"lanitoman",
age:1023,
isHeProgrammer:true
}