Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

FILTER METHOD. IMPORTANT

const cats = ['Leopard', 'Serval', 'Jaguar', 'Tiger', 'Caracal', 'Lion'];

const filtered = cats.filter((cat) => cat.startsWith('L'));
console.log(filtered);
// [ "Leopard", "Lion" ]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #FILTER #IMPORTANT
ADD COMMENT
Topic
Name
5+5 =