File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change 11// Take the commented ES5 syntax and convert it to ES6 arrow Syntax
22
3- // let myFunction = function () {
4- // console.log("Function was invoked!");
5- // };
6- // myFunction();
3+ let myFunction = ( ) => {
4+ console . log ( "Function was invoked!" ) ;
5+ } ;
6+ myFunction ( ) ;
77
8- // let anotherFunction = function (param) {
9- // return param;
10- // };
11- // anotherFunction("Example");
8+ let anotherFunction = ( param ) => {
9+ console . log ( param ) ;
10+ } ;
11+ anotherFunction ( "Example" ) ;
1212
13- // let add = function (param1, param2) {
14- // return param1 + param2;
15- // };
16- // add(1,2);
13+ let add = ( param1 , param2 ) => {
14+ console . log ( param1 + param2 ) ;
15+ return param1 + param2 ;
16+ } ;
17+ add ( 1 , 2 ) ;
1718
18- // let subtract = function (param1, param2) {
19- // return param1 - param2;
20- // };
21- // subtract(1,2);
19+ let subtract = ( param1 , param2 ) => {
20+ console . log ( param1 - param2 ) ;
21+ } ;
22+ subtract ( 1 , 2 ) ;
2223
2324
2425// Stretch
You can’t perform that action at this time.
0 commit comments