function isBigEnough(value) {
return value > 10;
}
const filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
// filtered is [12, 130, 44]
the above example from MDN would there have been any disadvantages? if we rewrite code as const filtered = [12, 5, 8, 130, 44].filter(x=>(x>10));
resulting in same output .a function expression way (ensures of course code would be more readable and hoisting not done).