const {performance} = require('perf_hooks');
const nemo = ['nemo'];
const everyone = ['dory','judy','bruce willis','matthew','nemo','nigel','squirt','gill','hank','darla'];
const large = new Array(1000000).fill('nemo');
// your CPU determines how fast this really is.
function findNemo(array){
let t0 = performance.now();
for (let i = 0; i < array.length; i++){
if (array[i] === 'nemo'){
console.log("Found Nemo");
}
}
let t1 = performance.now();
console.log(t0);
console.log(t1);
console.log(`found em in ${t1 - t0} milliseconds`);
}
findNemo(large);
as