programming-examples/js/Functions/Write a JavaScript function that returns array elements larger than a number..js

9 lines
237 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function BiggerElements(val)
{
return function(evalue, index, array)
{
return (evalue >= val);
};
}
var result = [11, 45, 4, 31, 64, 10]. filter(BiggerElements(10));
console.log(result);