Yngvarr

Generation

generate functionFri, 14 Apr 2023

search in array

function search(array, item) { for(let i=0; i<array.length; i++) { if(array[i] === item) { return i; } } return -1; }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant