January 2017
Beginner to intermediate
550 pages
10h 6m
English
JavaScript uses almost all variations of arrows. With ES6, it introduces a new syntax for writing functions. We have always written function expressions in JavaScript. It is idiomatic to write code like this in JavaScript (this example is in jQuery):
$("#submit-btn").click(function (event) {
validateForm();
submitMessage();
});
This is a typical jQuery event handler. The event handler click() function accepts a function as a parameter and we will simply create an inline anonymous function expression and pass it to the click function. This style of writing anonymous function expressions is known as Lambda functions. Several other languages support this feature. Though lambdas are more or less standard in new languages, JavaScript ...
Read now
Unlock full access