From 40fb9ca8df654cf96ff3a2e8da0a8642e86fb793 Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Tue, 4 Jan 2022 19:02:41 +0530 Subject: [PATCH 1/6] Day-1 --- LearnJs.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 LearnJs.js diff --git a/LearnJs.js b/LearnJs.js new file mode 100644 index 00000000..68d89e2d --- /dev/null +++ b/LearnJs.js @@ -0,0 +1,28 @@ +let One = 3; +let Two = 3; + +console.log("One == Two ", One == Two); + +let js = "JavaScript"; +let cpp = "C++"; + +console.log(js == cpp); + +let n = [1, 2, 3]; +let nums = [1, 2, 3]; + +console.log("n==nums ", n == nums); + +let user1 = { + name: "Nick", + role: "Student", + country: "Ind", +}; + +let user2 = { + name: "Pushpa", + role: "Faculty", + country: "Ind", +}; + +console.log("User 1 == User 2", user1 == user2); From 526793b9ce17727caa258a0ef4fb8f5c563cadc8 Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Tue, 4 Jan 2022 19:04:26 +0530 Subject: [PATCH 2/6] Day-1 --- LearnJs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearnJs.js b/LearnJs.js index 68d89e2d..37a902cc 100644 --- a/LearnJs.js +++ b/LearnJs.js @@ -20,7 +20,7 @@ let user1 = { }; let user2 = { - name: "Pushpa", + name: "Prashant", role: "Faculty", country: "Ind", }; From 1db00c4835b75e49637d4e2b735d2f4fa0045d5d Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Tue, 4 Jan 2022 19:07:16 +0530 Subject: [PATCH 3/6] Day-1 files --- LearnJs.js => NikhilNama/LearnJs.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LearnJs.js => NikhilNama/LearnJs.js (100%) diff --git a/LearnJs.js b/NikhilNama/LearnJs.js similarity index 100% rename from LearnJs.js rename to NikhilNama/LearnJs.js From 247d935be3e6511922ab45618370b01ed00f11e7 Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Tue, 4 Jan 2022 21:30:22 +0530 Subject: [PATCH 4/6] Day-2 Functions & ControlStmts --- NikhilNama/conditionalStmts.js | 70 ++++++++++++++++++++++++++++++++++ NikhilNama/function.js | 24 ++++++++++++ NikhilNama/index.html | 12 ++++++ 3 files changed, 106 insertions(+) create mode 100644 NikhilNama/conditionalStmts.js create mode 100644 NikhilNama/function.js create mode 100644 NikhilNama/index.html diff --git a/NikhilNama/conditionalStmts.js b/NikhilNama/conditionalStmts.js new file mode 100644 index 00000000..33cd2938 --- /dev/null +++ b/NikhilNama/conditionalStmts.js @@ -0,0 +1,70 @@ +const arr = [1, 2, 3, 4, 5]; + +for (let i = 0; i < arr.length; i++) { + // loop + if (arr[i] % 2) { + // if condition + console.log("Odd Number: ", arr[i]); + } else { + // else + console.log("Even Number: ", arr[i]); + } +} +/** + * 90-A + * 70-90- B + * 60-70-C + * 50-60-D + * <50 -Fail + * + */ +const val = 10; + +if (val > 10) console.log("Value is greater that 10"); +else if (val > 0) { + console.log("Value is greater than 0 and less that 10"); +} else { + console.log("Values is less that 0"); +} + +const marks = 60; + +if (marks >= 80) { + console.log("Grade -A "); +} else if (marks >= 70) { + console.log("Grade -B"); +} else if (marks >= 60) { + console.log("Grade-C"); +} else if (marks >= 50) { + console.log("Grade-D"); +} else { + console.log("Grade-F"); +} + +const subMarks = [30, 70, 40, 56, 65, 44]; +let totoalMarks = 0, + passCount = 0, + failCount = 0, + minMarks = 1000, + maxMarks = 0; + +for (let i = 0; i < subMarks.length; i++) { + totoalMarks += subMarks[i]; //counting Total Marks + + //minMarks + if (minMarks > subMarks[i]) minMarks = subMarks; + //maxMarks + else if (maxMarks < subMarks[i]) maxMarks = subMarks; + + //passCount + if (subMarks[i] > 50) { + passCount++; + } else { + //fialCount + failCount++; + } +} + +console.log("Totoal Marks ", totoalMarks); +console.log("Number of Subjects Passed ", passCount); +console.log("Number of subjects Failed", failCount); diff --git a/NikhilNama/function.js b/NikhilNama/function.js new file mode 100644 index 00000000..0f49fff2 --- /dev/null +++ b/NikhilNama/function.js @@ -0,0 +1,24 @@ +// function declaration +function add(a, b) { + return a + b; +} + +const val = add(10 + 12); +console.log(val); + +function welcome(name) { + console.log(`Welocme to Swiggy i++ ${name}`); +} + +welcome("Nick"); + +const arrow = (name) => { + console.log(`This is an arrow function`, name); +}; +arrow("Varun"); + +const anonymous = function () { + console.log("This is an Anonymous Function"); +}; + +anonymous(); diff --git a/NikhilNama/index.html b/NikhilNama/index.html new file mode 100644 index 00000000..3979176c --- /dev/null +++ b/NikhilNama/index.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file From 5407ed25e8ba8372cd87d900870845147fc7ea72 Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Thu, 6 Jan 2022 19:25:41 +0530 Subject: [PATCH 5/6] Day-3 --- NikhilNama/Day-3.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 NikhilNama/Day-3.js diff --git a/NikhilNama/Day-3.js b/NikhilNama/Day-3.js new file mode 100644 index 00000000..9666a0a0 --- /dev/null +++ b/NikhilNama/Day-3.js @@ -0,0 +1,40 @@ +// Arrow Function +const Mul = (a, b) => { + return a * b; +}; + +console.log(Mul(18, 3)); + +// Self Invoking Function +(function (name) { + console.log("Hello", name); +})("Nick"); + +function runLenght(arr) { + let sum = 0; + for (let i = 0; i < arr.length; i++) { + sum += arr[i]; + console.log("Run lenght Encoding is ", sum); + } +} +const arr = [1, 2, 3, 4, 5]; + +runLenght(arr); + +// Task +const EvenOdd = (num) => { + if (num % 2) console.log("Odd Number"); + else console.log("Even Number"); +}; + +EvenOdd(11); + +const user = { + username: "Swagath", + password: "admin123", +}; + +let { username, password } = user; + +console.log(username); +console.log(password); From 1d90f7dff0859de9a0884e3161f882c995af951b Mon Sep 17 00:00:00 2001 From: Nikhilnama18 Date: Mon, 10 Jan 2022 03:22:52 +0530 Subject: [PATCH 6/6] Added Food-App File --- food-app | 1 + 1 file changed, 1 insertion(+) create mode 160000 food-app diff --git a/food-app b/food-app new file mode 160000 index 00000000..19e327b4 --- /dev/null +++ b/food-app @@ -0,0 +1 @@ +Subproject commit 19e327b4ac6e416a67477e1af75cd5d0f76bd104