word: angsa magically works

JavaScript

let array = [{ word: "angsa"},
  
  { word: "lamya"},
    { word: "lana"},
    { word: "maya"},
    { word: "haga"},
    { word: "hanta"},

    { word: "maka"},

    { word: "aktodaka"
    },
    { word: "satka"},
    {word: "kapa"},
    { word: "asa"
    }]
console.log(`array.length, log and dir of array`);
console.log(array.length);
console.log(array);
console.dir(array);
console.log(`now removing angsa`);
let angsaIndex = array.map(obj => obj.word).indexOf("angsa");
console.log(`log and dir of array[angsaIndex]:`);
console.log(array[angsaIndex]);
console.dir(array[angsaIndex]);
console.log(`log and dir of array pre-splice`);
console.log(array);
console.dir(array);
array.splice(angsaIndex, 1);
console.log(`log and dir of array post-splice`);
console.log(array);
console.dir(array);