This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Shorten the console log | |
const log = console.log.bind(document) | |
log("does it work?") | |
log("yes") | |
log(5) | |
// 2. Merge two arrays into one | |
const array1 = ["One", "Two", "Three"] | |
const array2 = ["Four", "Five", "Six"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* Dynamic Object properties using square brackets | |
*/ | |
let beverage = 'Beer'; | |
const myObj = { | |
a: 1, | |
b: 2, | |
c: 3, | |
food: 'cheese', |