myFindNemo2

Run Settings
LanguageJavaScript
Language Version
Run Command
const {performance} = require('perf_hooks'); const nemo = ['nemo']; const todos = ['dory',"otro",'nemo']; const large = new Array(200).fill('nemo'); function findNemo (array){ let t0 = performance.now(); for (let i = 0; i < array.length; i++){ if (array[i] === 'nemo'){ console.log("Encontré a NEMO"); } } let t1 = performance.now(); console.log("time to run" +(t1-t0)+" ms"); } findNemo(large);
Editor Settings
Theme
Key bindings
Full width
Lines