We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55cee59 commit b465551Copy full SHA for b465551
1 file changed
Functions & Methods/demo.js
@@ -0,0 +1,20 @@
1
+
2
+// Arrow function
3
+const add=(a,b)=>{
4
+ return a+b;
5
+}
6
+console.log("Addition is "+" "+add(2,3));
7
8
+// Function declaration
9
+function add1(c,d){
10
+ return c+d;
11
12
+console.log("Addition is "+" "+add1(5,3));
13
14
+// Function expression
15
+const add2=function(x,y){
16
+ return x+y;
17
18
+console.log("Addition is "+" "+add2(2,2));
19
20
0 commit comments