๐ย Reference
๐ย Chapter
arr.every(callback[, thisArg])
callback: ๊ฐ ์์๋ฅผ ์ํํ ํจ์. ์๋ ์ธ ๊ฐ์ง ์ธ์๋ฅผ ๋ฐ๋๋ค.
currentValue: ์ฒ๋ฆฌํ ํ์ฌ ์์index: ์ฒ๋ฆฌํ ํ์ฌ ์์์ ์ธ๋ฑ์ค (optional)array: every๋ฅผ ํธ์ถํ ๋ฐฐ์ด (optional)thisArg: callback์ ์คํํ ๋ this๋ก ์ฌ์ฉํ๋ ๊ฐ (optional)callback์ด ๋ชจ๋ ๋ฐฐ์ด ์์์ ๋ํด ์ฐธ(truethy)์ธ ๊ฐ์ ๋ฐํํ๋ ๊ฒฝ์ฐ true, ๊ทธ ์ธ์ falseconst isBelowThreshold = (currentValue) => currentValue < 40;
const array1 = [1, 30, 39, 29, 10, 13];
console.log(array1.every(isBelowThreshold));
// expected output: true