// Made by Yash { 'use strict'; // Example #1 // const btn = document.getElementById('btn'); // btn.addEventListener('click', () => { // console.log('CLICKED'); // }); // Example #2 // const arr = [1,2,3,4,5]; // const double = arr.map(el => el * 2); // console.log('DOUBLED', double); // Example #3 // const parent = callback => { // // What's the "typeof callback"? // console.log('AT START'); // setTimeout(() => { // callback(); // }, 2000); // console.log('AT END'); // }; // const child = () => { // console.log('I AM CHILD'); // }; // parent(child); // Example #4 - passing arguments to callback // const target = (callback, arg) => { // console.log('AT START'); // setTimeout(() => { // callback(arg); // }, 2000); // console.log('AT END'); // }; // const func = number => { // console.log('CALLING CHILD WITH NUMBER:', number); // }; // target(func, 10); }