What is val parameter how it is cakled or passed?

Continuing the discussion from freeCodeCamp Challenge Guide: Filter Arrays with Filter:

i passed the challenge. But still stuck with How does this “function(val) and return val;” works.

Hello,

I don’t understand why ES6 doesn’t works here but on previous exercice yes ?

var newArray = oldArray.filter(element => element.length < 6);

the same as

var newArray = oldArray.filter(function(element) {
    return element < 6;
});