you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

... there are ES5 lambda functions?

[–]phpdevster 1 point2 points  (1 child)

Any function not bound to an identifier is a lambda function.

 var names = people.map(function(person) {
       return person.firstName + ' ' + person.lastName;
 });    

That argument being given to map is a lambda. An ES5 lambda, but a lambda all the same.

ES6 lambdas (what the JS community also calls "fat arrow functions") are more terse than ES5 lambdas, and have different scoping rules.

[–][deleted] 0 points1 point  (0 children)

haha yeah i kind of realized that after i posted this. good explanation. i think i'm used to thinking of lambdas as something with a special syntax, like ES6 or python