Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js change object value

var myObject = { boo: true, baa: 5 };
console.log(myObject); 
// expected output: 
// { boo: true, baa:5}

myObject.boo = false;
myObject.baa++;
console.log(myObject); 
// expected output: 
// { boo: false, baa:6}
 
PREVIOUS NEXT
Tagged: #js #change #object
ADD COMMENT
Topic
Name
6+6 =