filter out strings from an array js code example
Example 1: javascript array filter
var numbers = [1, 3, 6, 8, 11];
var lucky = numbers.filter(function(number) {
return number > 7;
});
// [ 8, 11 ]
Example 2: javascript array filter
var newArray = array.filter(function(item) {
return condition;
});