Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change property in array of objects javascript

//change in array itself without need to another one 
arr.map(el =>{ el.bar == 1 && el.baz--} ); // don't forget {} in arrow function
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #property #array #objects #javascript
ADD COMMENT
Topic
Name
9+8 =