JSFiddle - React, Tailwind, and code Playground
by jonahe
JavaScript
let testArray = ["a", "b", "c", "d"];
function removeItemAtIndex(array, indexToRemove) {
/*
TODO. do something here so
that "testArray" gets the item at "indexToRemove" removed.
*/
}
const indexToRemove = 1;
removeItemAtIndex(testArray, indexToRemove);
console.log("After running removeItemAtIndex. testArray is now ", testArray);