Hi everyone,
Anybody knows about javascript Lambada functions, i got questions from interviewer.
Thanks
Hi everyone,
Anybody knows about javascript Lambada functions, i got questions from interviewer.
Thanks
Never heard the term Lambda function before. A brief google search indicated that it’s just another word for an arrow function expression: x => x * 2
I learned from CS50 is an anonymous function. That means a function that has no name or identifier.
As per Wikipedia.
Cheers!
Ok, turns out that both our inputs aren’t precise. According to this article, the main feature of a lambda function is that they are passed as data and not hoisted:
In JavaScript, everything can be treated as an object, this means that a function can be sent into another function as a parameter and can also be retrieved from the called function as a return value
That is done mostly in shorthand syntax (fat arrow function) and mostly anonymous, but not necessarily:
The most salient point which differentiates lambda functions from anonymous functions in JavaScript is that lambda functions can be named
a lambda function is not necessarily anonymous and an anonymous function is not necessarily a lambda expression if it is not passed around like data. The fat (or thin) arrow notation is simply syntactic sugar.
Thanks for the information.
Hey thanks once again, just overview the internet, it’s around the anonymous or fat arrow function. its default to know the Lambada function.
Thanks for the information.