From 24da8324c4af747e4cdf450111f7f65572a6619f Mon Sep 17 00:00:00 2001
From: ajay-dhangar <99037494+Ajay-Dhangar@users.noreply.github.com>
Date: Sun, 13 Oct 2024 12:33:49 +0000
Subject: [PATCH 1/4] Updated contributors list
---
README.md | 112 ++++++++++++++++++++++++++++++------------------------
1 file changed, 63 insertions(+), 49 deletions(-)
diff --git a/README.md b/README.md
index 3e4296c2d..7d0c04834 100644
--- a/README.md
+++ b/README.md
@@ -178,6 +178,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
Haseeb Zaki
+
+
+
+
+ Riya Chauhan
+
+ |
@@ -199,6 +206,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Kajal Ahirwar
|
+
+
@@ -206,8 +215,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Meesala Govindu
|
-
-
@@ -222,6 +229,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
nishant4500
|
+
+
+
+
+ Hamza Mubin
+
+ |
@@ -230,10 +244,19 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Hamza Mubin
+ Samarth Vaidya
+
+ |
+
+
+
+
+
+
+ Md Afzal Mir
|
@@ -244,14 +267,12 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Md Afzal Mir
+ Arindam
|
-
-
@@ -273,6 +294,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Soumyadeep Paul
|
+
+
@@ -293,15 +316,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Yash Kumar Saini
- |
-
-
-
-
-
-
- Arindam
-
|
@@ -324,6 +338,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Navya Sharma
|
+
+
@@ -338,8 +354,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
Durga Karthik Yandrapu
|
-
-
+
+
+
+
+ Aswani Bolisetti
+
+ |
@@ -361,6 +382,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Mehul Prajapati
|
+
+
@@ -368,6 +391,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
K N Meghana
|
+
+
+
+
+ Bhumika Sharma
+
+ |
@@ -382,8 +412,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Tejas Athalye
|
-
-
@@ -398,6 +426,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Ruksina
|
+
+
@@ -412,13 +442,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
PRASHANT SWAROOP
|
-
-
-
-
- Bhumika Sharma
-
- |
@@ -426,8 +449,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Nishita Panchal
|
-
-
@@ -443,12 +464,14 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
Bhumika Sharma
|
+
+
@@ -470,8 +493,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Mohith Singh
|
-
-
@@ -493,6 +514,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Kratik Mandloi
|
+
+
@@ -514,8 +537,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Abhinandan
|
-
-
@@ -537,13 +558,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Sejal
|
-
-
-
-
- Samarth Vaidya
-
- |
+
+
@@ -558,8 +574,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Rajat singhal
|
-
-
@@ -588,6 +602,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Thalla Jayanth
|
+
+
@@ -602,8 +618,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Vivek Prakash
|
-
-
From 31aea322a1133edf5554896779cc4493c6474f10 Mon Sep 17 00:00:00 2001
From: kunikamakker
Date: Sun, 13 Oct 2024 18:49:57 +0530
Subject: [PATCH 2/4] function documentation
---
docs/languages/javascript/ex-8.md | 103 ++++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
create mode 100644 docs/languages/javascript/ex-8.md
diff --git a/docs/languages/javascript/ex-8.md b/docs/languages/javascript/ex-8.md
new file mode 100644
index 000000000..5cb1b9b23
--- /dev/null
+++ b/docs/languages/javascript/ex-8.md
@@ -0,0 +1,103 @@
+---
+id: functions-in-javascript
+sidebar_position: 8
+title: Functions in JavaScript
+sidebar_label: Functions in JS
+---
+
+A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output.
+
+
+
+## **Functions Declaration**
+
+Function Declarations also known as function statement or function definition consists of function keyword, function name, parameters separated by commas and function body enclosed by curly braces ```{ /*function body*/ }```
+
+
+```javascript
+function printName(name) {
+ return name;
+}
+```
+
+In the example above, the function ```printName``` takes one parameter called ```name```. The function body consist of one statement that returns the name.
+
+
+
+## **Function Expressions**
+
+Function expressions are a way to define a function as part of an expression. Unlike function declarations, which define a function with a name, function expressions can be anonymous (without a name) or named.
+
+## 1. **Anonymous Function Expression**
+An anonymous function expression is a function that doesn't have a name. It can be assigned to a variable, passed as an argument to another function, or returned from another function.
+
+```javascript
+const greet = function() {
+ console.log("Hello!");
+};
+
+greet();
+```
+
+## 2. **Named Function Expression**
+A named function expression includes a name. This can be useful for recursion or for better debugging.
+
+```javascript
+const greet = function sayHello() {
+ console.log("Hello!");
+};
+
+greet();
+```
+
+## 3. **IIFE (Immediately Invoked Function Expression)**
+An IIFE is a function that runs as soon as it is defined. It’s often used to create a local scope.
+
+```javascript
+(function() {
+ console.log("This runs immediately!");
+})();
+```
+
+
+
+## **Function Call**
+
+Calling a function means executing the code defined within it. There are various ways to call a function.
+
+```javascript
+const greet = function(name) {
+ console.log("Hello ", name);
+};
+
+greet("World!"); //Output: Hello World!
+```
+
+The above example is calling a function with argument
+
+
+```javascript
+const obj = {
+ greet: function() {
+ console.log("Hello from an object!");
+ }
+};
+
+obj.greet(); // Output: Hello from an object!
+```
+
+The above example is calling a method of an object
+
+```javascript
+const multiply = (x, y) => x * y;
+
+console.log(multiply(2, 3)); // Output: 6
+```
+
+The above example is of calling an arrow function
+
+
+## More Resources:
+
+- [MDN Web Docs: Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions)
+- [W3Schools: JavaScript Functions](https://www.w3schools.com/js/js_functions.asp)
From a0408d26a5300f34e1e0b945d5852785ec4fbb2c Mon Sep 17 00:00:00 2001
From: ajay-dhangar <99037494+Ajay-Dhangar@users.noreply.github.com>
Date: Sun, 13 Oct 2024 13:20:18 +0000
Subject: [PATCH 3/4] Updated contributors list
---
README.md | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 7d0c04834..92e8450ff 100644
--- a/README.md
+++ b/README.md
@@ -494,17 +494,17 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Ronin
+ Kunika Makker
|
-
-
+
+
- Rachita Dashore
+ Ronin
|
@@ -537,13 +537,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Abhinandan
|
-
-
-
-
- Kunika Makker
-
- |
@@ -558,8 +551,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Sejal
|
-
-
@@ -567,6 +558,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Rana Jay
|
+
+
@@ -602,8 +595,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Thalla Jayanth
|
-
-
@@ -611,6 +602,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Imgbot
|
+
+
From 66c76f40df0797e7375996b9cf1239605092b1b8 Mon Sep 17 00:00:00 2001
From: ajay-dhangar <99037494+Ajay-Dhangar@users.noreply.github.com>
Date: Mon, 14 Oct 2024 04:50:48 +0000
Subject: [PATCH 4/4] Updated contributors list
---
README.md | 224 +++++++++++++++++++++++++++---------------------------
1 file changed, 110 insertions(+), 114 deletions(-)
diff --git a/README.md b/README.md
index 14969dafc..dc772ad79 100644
--- a/README.md
+++ b/README.md
@@ -128,10 +128,10 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Bhuvaneswari Kapuluru
+ Abhijit Motekar
|
@@ -142,17 +142,17 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Abhijit Motekar
+ Bhuvaneswari Kapuluru
|
-
-
+
+
- Ananya Gupta
+ Haseeb Zaki
|
@@ -164,6 +164,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
+
+
+
+
+ Ananya Gupta
+
+ |
@@ -178,13 +185,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Kundan Rajoria
|
-
-
-
-
- Haseeb Zaki
-
- |
@@ -229,13 +229,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Meesala Govindu
|
-
-
-
-
- Hamza Mubin
-
- |
@@ -244,14 +237,12 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Kousthub J V
+ Hamza Mubin
|
-
-
@@ -259,18 +250,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
sriraghavi22
|
+
+
-
-
-
- Vivek Prakash
-
- |
-
-
-
+
+
- Priya
+ Kousthub J V
|
@@ -287,6 +273,20 @@ We are grateful to all the contributors who have helped improve this project. Yo
Md Afzal Mir
|
+
+
+
+
+ Vivek Prakash
+
+ |
+
+
+
+
+ Priya
+
+ |
@@ -296,6 +296,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
+
+
+
+
+ Irfan Ansari
+
+ |
@@ -310,13 +317,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Narendra Dhangar
|
-
-
-
-
- Irfan Ansari
-
- |
@@ -332,47 +332,47 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Mehul Prajapati
+ Sarthak
|
-
-
+
+
- Vishwas M D
+ Mansi07sharma
|
-
-
+
+
- Chekka Yogeswari
+ Navya Sharma
|
-
-
+
+
- K N Meghana
+ PrAyAg9
|
-
-
+
+
- Aswani Bolisetti
+ Durga Karthik Yandrapu
|
-
-
+
+
- Durga Karthik Yandrapu
+ Aswani Bolisetti
|
@@ -385,54 +385,54 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Sarthak
+ Kunika Makker
|
-
-
+
+
- PrAyAg9
+ Chekka Yogeswari
|
-
-
+
+
- Navya Sharma
+ Vishwas M D
|
-
-
+
+
- Mansi07sharma
+ Mehul Prajapati
|
-
-
+
+
- Shalini Bhandari
+ K N Meghana
|
-
-
+
+
- Tejas Athalye
+ Abhishek Farshwal
|
-
-
+
+
- Abhishek Farshwal
+ Tejas Athalye
|
@@ -442,6 +442,13 @@ We are grateful to all the contributors who have helped improve this project. Yo
Subham Singh
|
+
+
+
+
+ Shalini Bhandari
+
+ |
@@ -456,6 +463,15 @@ We are grateful to all the contributors who have helped improve this project. Yo
Rahul
|
+
+
+
+
+ Abhinandan
+
+ |
+
+
@@ -470,8 +486,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Nishita Panchal
|
-
-
@@ -480,17 +494,17 @@ We are grateful to all the contributors who have helped improve this project. Yo
|
-
-
+
+
- Himanshi Maheshwari
+ Bhumika Sharma
|
-
-
+
+
- Bhumika Sharma
+ Himanshi Maheshwari
|
@@ -500,6 +514,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Lokesh11868
|
+
+
@@ -513,15 +529,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Mohith Singh
- |
-
-
-
-
-
-
- Kunika Makker
-
|
@@ -551,6 +558,8 @@ We are grateful to all the contributors who have helped improve this project. Yo
Kratik Mandloi
|
+
+
@@ -564,15 +573,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
AJ
- |
-
-
-
-
-
-
- Abhinandan
-
|
@@ -595,8 +595,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Rana Jay
|
-
-
@@ -634,8 +632,6 @@ We are grateful to all the contributors who have helped improve this project. Yo
Imgbot
|
-
-
|