We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9e9410 commit 0752e63Copy full SHA for 0752e63
functions.js
@@ -0,0 +1,26 @@
1
+// Functions in JavaScript
2
+
3
+// A function may take some arguments and may not take some arguments
4
5
+// A function without arguments
6
+function hello() {
7
+ console.log("This is a function which is not taking any argument");
8
+ console.log("HELLO !");
9
+}
10
11
+console.log(hello()); //Calling the hello() function
12
13
+// A function with arguments
14
+// A function which take arguments may or may not return a value
15
+// A function can return a only a single value at a time
16
17
+let a;
18
+let b;
19
+let c;
20
+function add(a, b) {
21
+ console.log("This function adds two values passed to it");
22
+ return a + b;
23
24
25
+c = add(21, 22);
26
+console.log(c);
0 commit comments