Skip to content

NerOcrO/javascript-for-the-kids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 

Repository files navigation

  • "=>" update the array
  • "=" return a value

Properties

[๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡].length = 5

Methods

Array.from('๐Ÿ๐Ÿ๐Ÿ“๐ŸŒ๐Ÿ‡') = [๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡]

Array.isArray([๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡]) = โœ”

Array.of(๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡) = [๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡]

[๐Ÿฎ, ๐Ÿท].concat([๐Ÿ“, ๐Ÿ, ๐ŸŒ]) = [๐Ÿฎ, ๐Ÿท, ๐Ÿ“, ๐Ÿ, ๐ŸŒ]

[๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡].copyWithin(2) = [๐Ÿ, ๐Ÿ, ๐Ÿ, ๐Ÿ, ๐Ÿ“]
[๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡].copyWithin(1, 3) = [๐ŸŒ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡, ๐Ÿ‡]
[๐Ÿ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡].copyWithin(0, 3, 4) = [๐ŸŒ, ๐Ÿ, ๐Ÿ“, ๐ŸŒ, ๐Ÿ‡]

[๐ŸŒ, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ].every(vegetable => ๐ŸŒ) = โœ”
[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ, ๐ŸŒ].every(vegetable => ๐ŸŒ) = โœ˜

[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].fill(๐ŸŒ, 2, 4) => [๐Ÿฅ”, ๐Ÿฅ•, ๐ŸŒ, ๐ŸŒ, ๐Ÿ“]
[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].fill(๐ŸŒ, 1) => [๐Ÿฅ”, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ]
[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].fill(๐ŸŒ) => [๐ŸŒ, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ, ๐ŸŒ]

[๐Ÿ•, ๐Ÿ, ๐ŸŒญ, ๐Ÿ”, ๐ŸŸ].filter(ingredient => ๐Ÿ‡ฎ๐Ÿ‡น) = [๐Ÿ•, ๐Ÿ]
[๐Ÿ•, ๐Ÿ, ๐ŸŒญ, ๐Ÿ”, ๐ŸŸ].filter(ingredient => FR) = []

[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ].find(vegetable => fruit) = ๐Ÿ“
[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ].find(vegetable => cloth) = undefined

[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ].findIndex(vegetable => ๐Ÿ“) = 3
[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ].findIndex(vegetable => cloth) = -1

[๐Ÿ•, ๐Ÿ, [๐Ÿฅ’, ๐Ÿฅ”]].flat() = [๐Ÿ•, ๐Ÿ, ๐Ÿฅ’, ๐Ÿฅ”]
[๐Ÿ•, ๐Ÿ, [๐Ÿฅ’, ๐Ÿฅ”, [๐Ÿฑ, ๐Ÿถ]]].flat(2) = [๐Ÿ•, ๐Ÿ, ๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฑ, ๐Ÿถ]

[๐ŸŽ‚].forEach(๐Ÿฐ => console.log(๐Ÿฐ))

[๐Ÿฑ, ๐Ÿถ, ๐Ÿฆ‡, ๐Ÿท, ๐Ÿฎ].includes(๐Ÿท) = โœ”
[๐Ÿฑ, ๐Ÿถ, ๐Ÿฆ‡, ๐Ÿท, ๐Ÿฎ].includes(๐Ÿ”) = โœ˜

[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].indexOf(๐Ÿฆ‡) = 2
[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].indexOf(๐Ÿฆ‡, 2) = 4
[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].indexOf(๐Ÿ”) = -1

[๐ŸŒฌ, ๐Ÿ”ฅ, ๐ŸŒง].join() = '๐ŸŒฌ,๐Ÿ”ฅ,๐ŸŒง'
[๐ŸŒฌ, ๐Ÿ”ฅ, ๐ŸŒง].join(๐Ÿ”) = '๐ŸŒฌ๐Ÿ”๐Ÿ”ฅ๐Ÿ”๐ŸŒง'

[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].lastIndexOf(๐Ÿฆ‡) = 4
[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].lastIndexOf(๐Ÿช) = 1
[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].lastIndexOf(๐Ÿ”) = -1
[๐Ÿœ, ๐Ÿช, ๐Ÿฆ‡, ๐Ÿฆ†, ๐Ÿฆ‡].lastIndexOf(๐Ÿฆ‡, 3) = 4

[๐ŸŒฝ, ๐Ÿท, ๐Ÿ”, ๐Ÿฆ, ๐ŸŒพ].map(sourceMaterial => ๐Ÿณ) = [๐Ÿฟ, ๐Ÿฅ“, ๐Ÿ—, ๐Ÿค, ๐Ÿš]

[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].pop() = ๐Ÿ“
[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].pop() => [๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ]

[๐Ÿท, ๐Ÿ, ๐Ÿ‘].push([๐Ÿฎ, ๐Ÿ”]) = 5
[๐Ÿท, ๐Ÿ, ๐Ÿ‘].push([๐Ÿฎ, ๐Ÿ”]) => [๐Ÿท, ๐Ÿ, ๐Ÿ‘, ๐Ÿฎ, ๐Ÿ”]

[๐Ÿฎ, ๐Ÿท].reduce((accumulator, ingredient) => ๐Ÿ”ช, initialValue) = ๐Ÿ–

[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].reverse() = [๐Ÿ“, ๐Ÿ, ๐Ÿ, ๐Ÿฅ•, ๐Ÿฅ”]
[๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ, ๐Ÿ, ๐Ÿ“].reverse() => [๐Ÿ“, ๐Ÿ, ๐Ÿ, ๐Ÿฅ•, ๐Ÿฅ”]

[๐Ÿท, ๐Ÿ, ๐Ÿ‘, ๐Ÿฎ, ๐Ÿ”].shift() = ๐Ÿท
[๐Ÿท, ๐Ÿ, ๐Ÿ‘, ๐Ÿฎ, ๐Ÿ”].shift() => [๐Ÿ, ๐Ÿ‘, ๐Ÿฎ, ๐Ÿ”]
[].shift() => undefined

[๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜].slice() = [๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜]
[๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜].slice(2) = [๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜]
[๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜].slice(0, -2) = [๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช]
[๐Ÿœ, ๐Ÿฆ‡, ๐Ÿช, ๐Ÿฆ†, ๐Ÿ˜].slice(-2) = [๐Ÿฆ†, ๐Ÿ˜]

[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ“, ๐Ÿ].some(vegetable => fruit) = true
[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—].some(vegetable => fruit) = false

[1, 30, 4, 21].sort() = [1, 21, 30, 4]

[๐Ÿฅ’, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—].splice(1, 0, ๐Ÿฅ”) => [๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—]
[๐Ÿฅ’, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—].splice(3, 1, ๐Ÿฅ”) => [๐Ÿฅ’, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ”]

[๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—].toString() = '๐Ÿฅ’, ๐Ÿฅ”, ๐Ÿฅ•, ๐Ÿ„, ๐Ÿฅ—'

[๐Ÿท, ๐Ÿ, ๐Ÿ‘].unshift(๐Ÿฎ, ๐Ÿ”) = 5
[๐Ÿท, ๐Ÿ, ๐Ÿ‘].unshift(๐Ÿฎ, ๐Ÿ”) => [๐Ÿฎ, ๐Ÿ”, ๐Ÿท, ๐Ÿ, ๐Ÿ‘]

About

Learn JavaScript like a kid!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published