Last active
September 21, 2019 09:59
-
-
Save hustKiwi/2cb6a31d8b34a4660db6a991d585b669 to your computer and use it in GitHub Desktop.
This file contains 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
for (let i = 0; i < 5; i++) { | |
console.log(i); | |
} | |
let i = 0; | |
do { | |
console.log(i); | |
} while (++i < 5); | |
i = 0; | |
while (i < 5) { | |
console.log(i); | |
i++; | |
} | |
const car = { | |
size: 3, | |
wheel: 4 | |
}; | |
for (const prop in car) { | |
console.log(prop); | |
console.log(car[prop]); | |
} | |
const cars = ['a', 'b', car]; | |
for (const index in cars) { | |
console.log(index); | |
console.log(cars[index]); | |
} | |
for (const value of cars) { | |
console.log(value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment