const Nemo=["Nemo"];
const Everyone=["nemo","neme","nema","nemr","nemt","nemy","nemu","nemi","nemo","nema"];
const large=new Array(1000000).fill("nemo");
//Function to find the element "Nemo" in an array
function findNemo(array){
//Sets timer before loop begins
let t0=performance.now();
//for loop to iterate through an array and display nemo
for(let i=0; i<array.length; i++){
if(array[i]==="Nemo"){
console.log("Found Nemo");
}
}
//Sets timer after the loop ends
let t1=performance.now();
console.log("Call to find nemo took "+(t1-t0)+" milliseconds");
}
findNemo(large);