Introduction to React
ES6 Arrow Functions
If the function has only one statement and returns a value, then we can remove the braces and the return keyword, hence the resultant code will be:
We can also pass arguments in the ES6 inline functions, using the syntax:
Create an inline function named
threeProduct that takes in three numbers / arguments namely
c, and returns the product of those numbers.
Call the function inside a console.log function and pass
9 as arguments.