Replace value at a node with new value of an array code example
Example 1: replace array element javascript stack overflow
var index = items.indexOf(3452);
if (~index) {
items[index] = 1010;
}
Example 2: replace array element javascript stack overflow
var index = items.indexOf(3452);
if (index !== -1) {
items[index] = 1010;
}