+ 6
What's lambda in Javascript?
3 odpowiedzi
+ 4
it is short writings in coding
here is a good example for you to check
https://code.sololearn.com/WAlySl61dQKS/?ref=app
+ 1
const isEven = x => x % 2 === 0
+ 1
JavaScript calls them closures or even just anonymous functions. They're just functions used where you would normally put a variable's value.
Traditional syntax:
var a = function () {
console.log('hello');
};
There are a couple of new syntaxes allowed in ES6 (one shown by A_hook), but they treat some variables (like `this`) a little differently.