We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b974aff commit 84265f8Copy full SHA for 84265f8
2 files changed
Example/Function/Arrow functions/Arrow.js
@@ -0,0 +1,22 @@
1
+// basic Arrow funciton
2
+
3
+const greet = () => console.log("Good Morning");
4
5
+greet();
6
7
+// use arg..
8
9
+const info = (Name,Age) => {
10
+ console.log(`My name is ${Name} and age is ${Age}`);
11
+}
12
13
+info("Nishant",12);
14
15
+// return type + arg.
16
17
+let addNumbers = (a, b) => {
18
+ let result = a + b;
19
+ return result;
20
21
+let sum = addNumbers(5, 8);
22
+console.log("The sum is " + sum);
Example/Function/Arrow functions/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Document</title>
+ <script src="Arrow.js"></script>
+</head>
+<body>
+</body>
+</html>
0 commit comments