filter javascript array
var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
const result = words.filter(word => word.length > 6);
console.log(result);
filter javascript array
var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
const result = words.filter(word => word.length > 6);
console.log(result);
filtering in javascript
//filter numbers divisible by 2 or any other digit using modulo operator; %
const figures = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const divisibleByTwo = figures.filter((num) => {
return num % 2 === 0;
});
console.log(divisibleByTwo);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us