Bracket Notation Example
let cargoHold = ['oxygen tanks', 'space suits', 'parrot',
'instruction manual', 'meal packs', 'slinky',
'security blanket'];
/*a) Use bracket notation to replace ‘slinky’ with ‘space tether’.
Print the array to confirm the change.*/
cargoHold[5] = "space tether";
console.log(cargoHold);
//OR// cargoHold.splice(5,1, 'space tether');
// console.log(cargoHold);