JSFiddle - React, Tailwind, and code Playground
by alinaeem229
JavaScript
var searchInput;
searchInput = ["this", "is", "a", "test"];
for (var x = 0; x < searchInput.length; x++) {
if (searchInput[x].length < 4) {
searchInput.splice(x--, 1);
}
}
console.log(searchInput);