Answers for "js test1"

0

js test1

const array = [2, 5, 9];

console.log(array);

const index = array.indexOf(5);
if (index > -1) {
  array.splice(index, 1);
}

// array = [2, 9]
Posted by: Guest on August-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language