Posts

Showing posts with the label Arrow Functions

Arrow Functions

With Lightning Web Component framework and brand new Javascript Developer I certification, its good to be aware of some javascript features intorduced in ES6. Arrow Functions is one of such many features. Let's have a look at it. What are Arrow Functions? Arrow Functions are nothing but a compact alternative to a traditional function expression with some different behavior. Syntax: Depending on the number of arguments and number of lines in function there are different syntax for Arrow Functions No () around arguments, no {} around code and no return statement is required For multiple arguments, () around argument is required and for multiple lines of code {} around code is required and return statement is also required. 1. One argument and one line of code Function Expression: function calculateCircleArea(radius) {      re