Last active
September 6, 2023 00:20
-
-
Save mcsee/c5640773e3691e2aa6ac6db27b5596bf 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
colors.forEach((color) => { | |
console.log(color); | |
}); | |
// You use closures and arrow functions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
of
with iterators,in
is for string keys of objects (including inherited).for in
andfor of
syntax in js looks likefor (const ident of expression)
(where
const
could belet
orvar
andof
could bein
))
in the last statementconsole.log
Array
method is calledforEach
(capitalization)so, all in all: