FindNemo

Run Settings
LanguageJavaScript
Language Version
Run Command
const car = ['mercy']; const everyone = ['bmw', 'pagani', 'ferrari', 'mercy', 'nissan', 'porsche', 'bentley', 'lambo', 'mclaren', 'koenisseg']; const large = new Array(1000).fill('mercy'); function luxuryCar(array) { for (let i = 0; i < array.length; i++) { console.log('speed'); if (array[i] === 'mercy') { console.log('Found Luxury Car'); break; } } } luxuryCar(everyone); // O(n) --> Linear time // const boxes = [0, 1, 2, 3, 4, 5]; // function logFirstTwoBoxes(boxes) { // console.log(boxes[0]); // O(1) --> Constant time // console.log(boxes[1]); // O(1) --> Constant time // } // logFirstTwoBoxes(boxes);
Editor Settings
Theme
Key bindings
Full width
Lines