Skip to content

Commit c46df9c

Browse files
committed
took the commented ESS syntsx on the function-conversion.js file and converted it into ES6 arrow syntax
1 parent 9d0ff4e commit c46df9c

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎assignments/function-conversion.js‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
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+
const myFunction = (a,b) => {
4+
return ("Function was invoked");
5+
};
6+
console.log(myFunction())
77

8-
// let anotherFunction = function (param) {
9-
// return param;
10-
// };
11-
// anotherFunction("Example");
8+
const anotherFunction = (param) => {
9+
return param;
10+
};
11+
console.log(anotherFunction("Example"))
1212

13-
// let add = function (param1, param2) {
14-
// return param1 + param2;
15-
// };
16-
// add(1,2);
13+
const add = (param1, param2) => {
14+
return param1 + param2;
15+
};
16+
console.log(add(1,2))
1717

18-
// let subtract = function (param1, param2) {
19-
// return param1 - param2;
20-
// };
21-
// subtract(1,2);
18+
const subtract = (param1, param2) => {
19+
return param1 - param2;
20+
};
21+
console.log(subtract(1,2))
2222

2323

2424
// Stretch

0 commit comments

Comments
 (0)