InterviewSolution
Saved Bookmarks
| 1. |
Discuss the arrow function. |
|
Answer» In ES6, arrow functions are introduced. The shorthand syntax for writing ES6 functions is arrow functions. The arrow function's DEFINITION consists of parameters, followed by an arrow (=>), and the function's body. The 'fat arrow' function is another NAME for the Arrow function. We won't be able to employ them as constructors. CONST function_name = (arg_1, arg_2, arg_3, ...) => { //body of the function }Few things to note:
|
|