Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array Methods .filter()

const colours = ['green', 'black', 'dark-orange', 'light-yellow', 'azure'];
// a 6 karakternél hosszab színekre szűrünk:
const result = colours.filter(colour => colour.length > 6);
console.log(result);
// --> [ 'dark-orange', 'light-yellow' ]
Source by github.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #Methods
ADD COMMENT
Topic
Name
1+6 =