JSFiddle - React, Tailwind, and code Playground
by jonahe
JavaScript
const names = ["kajsa", "kim", "kalle", "kristina" ];
const indexOfKim = names.findIndex("kim");
if(indexOfKim !== -1) {
// found a match for kim
// lets remove
}
alert( names.filter(name => name !== "kalle" ));