Yngvarr

Generation

generate functionFri, 14 Apr 2023

search in array

var names = ["John", "Paul", "George", "Ringo"]; function searchInArray(name) { for (var i = 0; i < names.length; i++) { if (names[i] === name) { return true; } } return false; } searchInArray("John");

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant