filter() js how to match code example
Example 1: javascript array filter elements greater than
function isGreater(element, index, array) {
return (element >= 10);
}
let testElemets = [12, 5, 8, 130, 44].filter(isGreater);
console.log("Test Value : " + testElemets );
Example 2: javascript filter array match includes exact
let format = arrayList.filter(function (el) {
return el.name.toLowerCase() === name.toLowerCase();
});