From 3e226def036f53bfd997e9f864323b984db50286 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:05:27 +0530 Subject: [PATCH 01/15] Delete .gitattributes.txt --- .gitattributes.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes.txt diff --git a/.gitattributes.txt b/.gitattributes.txt deleted file mode 100644 index ac6fe85..0000000 --- a/.gitattributes.txt +++ /dev/null @@ -1 +0,0 @@ -*.roff linguist-detectable=false \ No newline at end of file From 8f75ebdb3d299dcfcc10fcbdef8ffc9a5a764e63 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:05:47 +0530 Subject: [PATCH 02/15] attributes --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ + From 05a667bee5271e9bd723cfedac06158a000653c6 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:06:12 +0530 Subject: [PATCH 03/15] Attributes added --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 8b13789..e277fc3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ - +*.roff linguist-detectable=false From 005f3338f8fb94c4a28588df33bb83c33cb353e5 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:10:27 +0530 Subject: [PATCH 04/15] Attributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index e277fc3..336f867 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -*.roff linguist-detectable=false +*.Roff linguist-detectable=false From 1ebd51c38ccf42794aa2a5638254d4f0df1e78d7 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:13:28 +0530 Subject: [PATCH 05/15] Exercise 13.2 --- Chapter 13/Exercise 13.2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Chapter 13/Exercise 13.2 diff --git a/Chapter 13/Exercise 13.2 b/Chapter 13/Exercise 13.2 new file mode 100644 index 0000000..7c0367a --- /dev/null +++ b/Chapter 13/Exercise 13.2 @@ -0,0 +1,13 @@ +const myPromise = new Promise((resolve, reject) => { + resolve("Start Counting"); +}); + +function counter(val){ + console.log(val); +} + +myPromise + .then(value => {counter(value); return "one"}) + .then(value => {counter(value); return "two"}) + .then(value => {counter(value); return "three"}) + .then(value => {counter(value);}) From 8bccfa9c3a481b3af717630c68edb94f1ac3b202 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:15:24 +0530 Subject: [PATCH 06/15] Exercise 13.3 --- Chapter 13/Exercise 13.3 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Chapter 13/Exercise 13.3 diff --git a/Chapter 13/Exercise 13.3 b/Chapter 13/Exercise 13.3 new file mode 100644 index 0000000..7352955 --- /dev/null +++ b/Chapter 13/Exercise 13.3 @@ -0,0 +1,17 @@ +let cnt = 0; +function outputTime(val) { + return new Promise(resolve => { + setTimeout(() => { + cnt++; + resolve(`x value ${val} counter:${cnt}`); + }, 1000); + }); +} +async function aCall(val) { + console.log(`ready ${val} counter:${cnt}`); + const res = await outputTime(val); + console.log(res); +} +for (let x = 1; x < 4; x++) { + aCall(x); +} From 8528321836a4c8e753d5ff8674bb635f1f1b8a5f Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:15:47 +0530 Subject: [PATCH 07/15] Project 1 --- Chapter 13/Project 1 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Chapter 13/Project 1 diff --git a/Chapter 13/Project 1 b/Chapter 13/Project 1 new file mode 100644 index 0000000..85218a0 --- /dev/null +++ b/Chapter 13/Project 1 @@ -0,0 +1,33 @@ +const allowed = ["1234", "pass", "apple"]; + +function passwordChecker(pass) { + return allowed.includes(pass); +} + +function login(password) { + return new Promise((resolve, reject) => { + if (passwordChecker(password)) { + resolve({ + status: true + }) + } else { + reject({ + status: false + }) + } + }) +} + +function checker(pass) { + login(pass) + .then(token => { + console.log("Approve:"); + console.log(token) + }) + .catch(value => { + console.log("Reject:"); + console.log(value) + }) +} +checker("1234"); +checker("wrong"); From dcf4b32022e6b4db2fffb24a1fbaaff211148c69 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:18:36 +0530 Subject: [PATCH 08/15] Exercise 11.1 --- Chapter 11/Exercise 11.1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Chapter 11/Exercise 11.1 diff --git a/Chapter 11/Exercise 11.1 b/Chapter 11/Exercise 11.1 new file mode 100644 index 0000000..3500bac --- /dev/null +++ b/Chapter 11/Exercise 11.1 @@ -0,0 +1,26 @@ + + + + + Laurence Svekis + + + + + + + From 8e9e6edbd1b8018816180de18c5b7869e5113097 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:19:00 +0530 Subject: [PATCH 09/15] Exercise 11.2 --- Chapter 11/Exercise 11.2 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Chapter 11/Exercise 11.2 diff --git a/Chapter 11/Exercise 11.2 b/Chapter 11/Exercise 11.2 new file mode 100644 index 0000000..1dd71f6 --- /dev/null +++ b/Chapter 11/Exercise 11.2 @@ -0,0 +1,17 @@ + + + +
red
+
blue
+
green
+
yellow
+ + + From 36059d206e9ae6a84372a8d217fabdc1798c030c Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:19:17 +0530 Subject: [PATCH 10/15] Exercise 11.3 --- Chapter 11/Exercise 11.3 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Chapter 11/Exercise 11.3 diff --git a/Chapter 11/Exercise 11.3 b/Chapter 11/Exercise 11.3 new file mode 100644 index 0000000..91e029d --- /dev/null +++ b/Chapter 11/Exercise 11.3 @@ -0,0 +1,20 @@ + + + + JS Tester + + + + + From 2e53589a4182d2a53596581ead4493867bdcc43e Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:19:36 +0530 Subject: [PATCH 11/15] Exercise 11.4 --- Chapter 11/Exercise 11.4 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Chapter 11/Exercise 11.4 diff --git a/Chapter 11/Exercise 11.4 b/Chapter 11/Exercise 11.4 new file mode 100644 index 0000000..73e7de0 --- /dev/null +++ b/Chapter 11/Exercise 11.4 @@ -0,0 +1,32 @@ + + + + JS Tester + + +
+ + + From ed7e602bf0c0cc1ecb5c05505c31437dca18f886 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:19:55 +0530 Subject: [PATCH 12/15] Exercise 11.5 --- Chapter 11/Exercise 11.5 | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Chapter 11/Exercise 11.5 diff --git a/Chapter 11/Exercise 11.5 b/Chapter 11/Exercise 11.5 new file mode 100644 index 0000000..dc9132f --- /dev/null +++ b/Chapter 11/Exercise 11.5 @@ -0,0 +1,42 @@ + + + + JS Tester + + +
+ + + +
+ +
+ + + + From 1ff3731aedd032144d91c44e636d921a14727a16 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:20:16 +0530 Subject: [PATCH 13/15] Exercise 11.6 --- Chapter 11/Exercise 11.6 | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Chapter 11/Exercise 11.6 diff --git a/Chapter 11/Exercise 11.6 b/Chapter 11/Exercise 11.6 new file mode 100644 index 0000000..92efce1 --- /dev/null +++ b/Chapter 11/Exercise 11.6 @@ -0,0 +1,44 @@ + + + + JS Tester + + + +
+
Box #1
+
Box #2
+
Box #3
+
Box #4
+
+ + + + From c3a029061fbd9354ca0bba4a64ae2321a6637fd8 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:20:45 +0530 Subject: [PATCH 14/15] Exercise 11.7 --- Chapter 11/Exercise 11.7 | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Chapter 11/Exercise 11.7 diff --git a/Chapter 11/Exercise 11.7 b/Chapter 11/Exercise 11.7 new file mode 100644 index 0000000..2da5360 --- /dev/null +++ b/Chapter 11/Exercise 11.7 @@ -0,0 +1,43 @@ + + + + JS Tester + + +
+
+ +
+
+ + + + From 3059c11f1eb99422510e311606988f9a02a6788e Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 22:21:02 +0530 Subject: [PATCH 15/15] Exercise 11.8 --- Chapter 11/Exercise 11.8 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Chapter 11/Exercise 11.8 diff --git a/Chapter 11/Exercise 11.8 b/Chapter 11/Exercise 11.8 new file mode 100644 index 0000000..b6bc062 --- /dev/null +++ b/Chapter 11/Exercise 11.8 @@ -0,0 +1,28 @@ + + + + JS Tester + + +
+ + + + +