Skip to content

Commit 34b5523

Browse files
committed
adding demo code for arrow functions
1 parent d7206f4 commit 34b5523

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

15-arrow-functions/demo.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const add = (a, b) => a + b;
2+
console.log(add(1, 2));
3+
4+
const subtract = (a, b) => {
5+
const result = a - b;
6+
return result;
7+
};
8+
console.log(subtract(1, 1));

0 commit comments

Comments
 (0)