From 012863e67a2ec9acc4bdc9c4c2ec5c968ae1fad9 Mon Sep 17 00:00:00 2001
From: Prantik-Bhattacharjee
Date: Sun, 27 Mar 2022 21:00:05 +0530
Subject: [PATCH 1/5] updated-19BCE10222
---
app.js | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
index.html | 22 +++++++++++++++++
2 files changed, 93 insertions(+)
create mode 100644 app.js
create mode 100644 index.html
diff --git a/app.js b/app.js
new file mode 100644
index 0000000..fd0d398
--- /dev/null
+++ b/app.js
@@ -0,0 +1,71 @@
+// Function #1: Array Slice;
+const foods = ["pizza", "burger", "fingerChips", "donuts", "springRoll"];
+const modifiedFood = foods.slice(
+ foods.indexOf("pizza") + 1,
+ foods.indexOf("springRoll")
+);
+console.log(modifiedFood);
+
+//function #2: Array Spliceconst
+var foods1 = ["pizza", "burger", "fingerChips", "donuts", "springRoll"];
+var modifiedFood1 = foods1.splice(2, 0, "noodles", "icecream");
+console.log(foods1);
+
+//Function #3: Filter
+const numberArray = [12, 324, 213, 4, 2, 3, 45, 4234];
+
+function isEvan(numberArray) {
+ return numberArray.filter(function (number) {
+ if (number % 2 === 0) {
+ return number;
+ }
+ });
+}
+
+var evenNumbers = isEvan(numberArray);
+console.log(evenNumbers);
+
+function isPrime(numberArray) {
+ return numberArray.filter((number) => {
+ for (var i = 2; i <= Math.sqrt(number); i++) {
+ if (number % i === 0) return false;
+ }
+ return true;
+ });
+}
+
+var primeNumbers = isPrime(numberArray);
+console.log(primeNumbers);
+
+//Function #4: Reject
+
+var reject = {};
+//Function #5: Lambda function
+var evenNumbers1 = numberArray.filter((number) => {
+ if (number % 2 == 0) return number;
+});
+console.log(evenNumbers1);
+
+//Function #6: Map
+
+const myArray = [11, 34, 20, 5, 53, 16];
+
+function findSquareOfNumbers(myArray) {
+ return myArray.map(function (number) {
+ return number * number;
+ });
+}
+
+var SquareOfNumbers = findSquareOfNumbers(myArray);
+console.log(SquareOfNumbers);
+
+//Function #7: Reduce
+
+const myArray1 = [2, 3, 5, 10];
+
+function multiply(myArray1) {
+ return myArray1.reduce((a, b) => a * b, 1);
+}
+
+var multiplication = multiply(myArray1);
+console.log(multiplication);
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..1216e80
--- /dev/null
+++ b/index.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ Higher Order Functions
+
+
+
+
+
+
+ Higher Order Functions
+
+
+ Created by -
Annika Chandra - 19BCE10049
Squad -
+ 106
+ ProGrad ❤️
+
+
+
\ No newline at end of file
From 22a4f23bdfbe91b3c1609d27ec357e69df90b2fd Mon Sep 17 00:00:00 2001
From: Prantik-Bhattacharjee
<102134319+Prantik-Bhattacharjee@users.noreply.github.com>
Date: Sun, 27 Mar 2022 21:02:43 +0530
Subject: [PATCH 2/5] Set theme jekyll-theme-slate
---
_config.yml | 1 +
1 file changed, 1 insertion(+)
create mode 100644 _config.yml
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..c741881
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1 @@
+theme: jekyll-theme-slate
\ No newline at end of file
From 8311265197286db318ac68eaea020a696bfae60b Mon Sep 17 00:00:00 2001
From: Prantik-Bhattacharjee
<102134319+Prantik-Bhattacharjee@users.noreply.github.com>
Date: Sun, 27 Mar 2022 21:03:37 +0530
Subject: [PATCH 3/5] Set theme jekyll-theme-merlot
---
_config.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/_config.yml b/_config.yml
index c741881..c50ff38 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1 +1 @@
-theme: jekyll-theme-slate
\ No newline at end of file
+theme: jekyll-theme-merlot
\ No newline at end of file
From 05eb0eeb98aa63b90145b3053c499a4b3803379d Mon Sep 17 00:00:00 2001
From: Prantik-Bhattacharjee
Date: Sun, 27 Mar 2022 21:05:31 +0530
Subject: [PATCH 4/5] updated-19BCE10222
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 1216e80..cee5c34 100644
--- a/index.html
+++ b/index.html
@@ -14,7 +14,7 @@
Higher Order Functions
- Created by -
Annika Chandra - 19BCE10049
Squad -
+ Created by -
Prantik Bhattacharjee - 19BCE10222
Fed-Squad -
106
ProGrad ❤️