“Filter di Javascipt” Kode Jawaban

Filter JavaScript Array

var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];

const result = words.filter(word => word.length > 6);

console.log(result);
White Browed Owl

Filter JavaScript

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];

const filter = arr.filter((number) => number > 5);
console.log(filter); // [6, 7, 8, 9]

or 

const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];

const result = words.filter(word => word.length > 6);

console.log(result);
// expected output: Array ["exuberant", "destruction", "present"]
Aggressive Albatross

Filter di Javascipt

const numbers = [5, 13, 7, 30, 5, 2, 19];
const bigNumbers = numbers.filter(number => number > 20);
console.log(bigNumbers);
//Output: [30]
Ariful Islam Adil(Code Lover)

Jawaban yang mirip dengan “Filter di Javascipt”

Pertanyaan yang mirip dengan “Filter di Javascipt”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya