๐Ÿ“šย Reference


๐Ÿ“œย Chapter


find()

โ€ฃ

filter()


arr.filter(callback(element[, index[, array]])[, thisArg])
let score = [40, 80, 75, 90, 35, 81];
let message = ["ํ™๊ธธ๋™", "ํ™ํ™๊ธธ๋™", "ํ™", "ํ™ํ™ํ™๊ธธ๋™", "๊ธธ๋™์ด"];

// [90, 81]
console.log(score.filter((x) => x > 80));

// ["ํ™๊ธธ๋™", "๊ธธ๋™์ด"]
console.log(message.filter((x) => x.length == 3));