├── Lessons ├── tempCodeRunnerFile.js ├── Promise-API │ ├── style.css │ ├── index.html │ └── script.js ├── AttributesMethods │ ├── index.html │ └── script.js ├── Variables.js ├── Promise.js ├── AsyncAwait │ ├── index.html │ └── script.js ├── InsertionMethods │ ├── index.html │ └── script.js ├── WhileLoop.js ├── IIFE.js ├── Navigation │ ├── style.css │ ├── index.html │ └── script.js ├── ForLoop.js ├── PromiseChaining.js ├── introduction.md ├── Primitives.js ├── Strings.js ├── Arrays.js ├── SessionStorage.html ├── Inheritance.js ├── JScookies.html ├── StringMethods.js ├── LocalStorage.html ├── ConditionalStatements.js ├── Destructuring.js ├── ErrorObject.html ├── VarLetConst.js ├── FunctionInJS.js ├── FetchAPI.html ├── MultipleHandlers.html ├── Finally.html ├── Windows.md ├── Prototype.html ├── Classes&Objects.html ├── OverridingConstructor.js ├── CallBack.js ├── BrowserEvents.md ├── TryCatch.html ├── getters&setters.html ├── ThenCatch.html ├── Constructors.html ├── LoopsInArray.js ├── ArrayMethods.js ├── DOM-Methods │ └── index.html ├── Operators.js └── ConsoleTypes.js ├── Exercises ├── Ex-4 │ ├── bg.png │ ├── hacker.png │ ├── index.html │ ├── style.css │ └── script.js ├── Ex-7 │ ├── beep.mp3 │ ├── index.html │ ├── script.js │ └── style.css ├── Ex-2 │ ├── style.css │ ├── index.html │ └── script.js ├── Ex-6 │ ├── style.css │ ├── script.js │ └── index.html ├── Ex-3 │ ├── script.js │ └── index.html ├── Ex-1.js └── Ex-5 │ ├── index.html │ └── script.js └── README.md /Lessons/tempCodeRunnerFile.js: -------------------------------------------------------------------------------- 1 | g(a, b) 2 | -------------------------------------------------------------------------------- /Lessons/Promise-API/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | width: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /Exercises/Ex-4/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham-Bhoite/JavaScript-Programming/main/Exercises/Ex-4/bg.png -------------------------------------------------------------------------------- /Exercises/Ex-4/hacker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham-Bhoite/JavaScript-Programming/main/Exercises/Ex-4/hacker.png -------------------------------------------------------------------------------- /Exercises/Ex-7/beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham-Bhoite/JavaScript-Programming/main/Exercises/Ex-7/beep.mp3 -------------------------------------------------------------------------------- /Lessons/AttributesMethods/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SHUBHAM 5 | 6 | 7 |
8 | Hey, I am the first div 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Lessons/Variables.js: -------------------------------------------------------------------------------- 1 | // Variables: Variables are used to store data. 2 | 3 | 4 | console.log("Hello! Welcome my JavaScript Programming") 5 | var a = 22 // a contains 22 6 | console.log(a) 7 | a = "Shubham" 8 | console.log(a) 9 | // let 4shubham = 4 // Not allowed this will throw an error 10 | 11 | 12 | -------------------------------------------------------------------------------- /Lessons/Promise.js: -------------------------------------------------------------------------------- 1 | let promise = new Promise(function(resolve, reject){ 2 | resolve(44) 3 | }); 4 | 5 | console.log("Hey, how are you?") 6 | setTimeout(function() { 7 | console.log("Hello, i'm fine!") 8 | }, 3000) 9 | 10 | console.log("My name is " + "Official shubhya") 11 | console.log(promise) 12 | -------------------------------------------------------------------------------- /Lessons/AsyncAwait/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Async/Await 7 | 8 | 9 | Hello, kaise ho aap? 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Exercises/Ex-2/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | width: 100%; 4 | } 5 | 6 | 7 | #joke{ 8 | background-color: #160606; 9 | color: #e7d6d6; 10 | font-size: 1.5em; 11 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 12 | padding: 10px; 13 | text-align: center; 14 | width: 100%; 15 | } 16 | -------------------------------------------------------------------------------- /Lessons/InsertionMethods/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Insertion Methods 4 | 5 | 6 | I am outside div (start) 7 |
8 | I am start of this container 9 |
I am first element
10 | I am end of this container 11 |
12 | I am outside div(end) 13 | 14 | 15 | -------------------------------------------------------------------------------- /Lessons/Promise-API/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Promise API 8 | 9 | 10 | 11 | 12 | See in the console 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Lessons/WhileLoop.js: -------------------------------------------------------------------------------- 1 | // While Loop: 2 | let input = prompt("Enter a number"); 3 | input = Number(input); 4 | let i = 0; 5 | 6 | while (i < input) { 7 | console.log(i); // print the current value of i 8 | i++; // increment i by 1 9 | } 10 | 11 | 12 | // Do-While Loop: 13 | let n= prompt("Enter the value of n") 14 | n=Number.parseInt(n) 15 | 16 | let a=0; 17 | do{ 18 | console.log(a) 19 | a++; 20 | }while (a { 4 | return new Promise((resolve, reject) => { 5 | setTimeout(() => { 6 | resolve("Hey, bro") 7 | }, 3000) 8 | }) 9 | } 10 | 11 | (async () => { 12 | let b = await a() 13 | console.log(b) 14 | let c = await a() 15 | console.log(c) 16 | let d = await a() 17 | console.log(d) 18 | })() 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Lessons/Navigation/style.css: -------------------------------------------------------------------------------- 1 | html, body{ 2 | margin: 0; 3 | padding: 0; 4 | font-family: 'Roboto', sans-serif; 5 | font-size: 16px; 6 | color: #333; 7 | background-color: #f5f5f5; 8 | } 9 | 10 | ul{ 11 | text-align: center;; 12 | background-color: #333; 13 | color: #f5f5f5; 14 | margin: 0; 15 | padding: 29; 16 | list-style: none; 17 | } 18 | 19 | ul li{ 20 | display: inline-block; 21 | margin: 0 10px; 22 | } -------------------------------------------------------------------------------- /Lessons/ForLoop.js: -------------------------------------------------------------------------------- 1 | // For Loop: 2 | for (let i = 1; i <= 15; i++) { 3 | console.log(i); 4 | } 5 | 6 | 7 | // For-In Loop: 8 | let person = { 9 | name: "Shubham", 10 | age: 21, 11 | gender: "male" 12 | }; 13 | 14 | for (let x in person) { 15 | console.log(x + ": " + person[x]); 16 | } 17 | 18 | 19 | // For-Of Loop: 20 | let numbers = [1, 2, 3, 4, 5]; 21 | 22 | for (let number of numbers) { 23 | console.log(number); 24 | } -------------------------------------------------------------------------------- /Lessons/Navigation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Portfolio 5 | 6 | 7 | 8 | 15 | 16 |
17 |

Hey, this is a simple test website

18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Lessons/PromiseChaining.js: -------------------------------------------------------------------------------- 1 | let p1 = new Promise((resolve, reject) =>{ 2 | setTimeout(() =>{ 3 | console.log("Resolved after 3 seconds") 4 | resolve(22) 5 | }, 3000) 6 | }) 7 | 8 | p1.then((value) =>{ 9 | console.log(value) 10 | return new Promise((resolve, reject) => { 11 | setTimeout(()=>{ 12 | resolve("Promise 2") 13 | }, 2000) 14 | }) 15 | }).then((value) => { 16 | console.log("We are done") 17 | return 2 18 | }).then((value)=>{ 19 | console.log("kay haal hai bhai!") 20 | }) -------------------------------------------------------------------------------- /Lessons/Navigation/script.js: -------------------------------------------------------------------------------- 1 | // Accessing the first child node of the body 2 | let firstChild = document.body.firstChild; 3 | console.log(firstChild); // #text 4 | 5 | // Accessing the first element child node of the body 6 | let firstElementChild = document.body.firstElementChild; 7 | console.log(firstElementChild); //