1.

What is the difference between arrow functions & normal functions?

Answer»

1) Using the arrow function, you can get the same RESULTS as normal functions by writing a few lines of code as shown in the example below.

//Example of Regular function:
VAR ADD = function(c, d) { return c + d;};

// Example of Arrow function
let add = (c, d) => { return c + d}; //or
let add = (c, d) => c + d;

2) In normal functions, argument binding is POSSIBLE and other HAND arrow functions have no argument binding.

3) Regular functions are construable but arrow functions are not constructible.



Discussion

No Comment Found