Posts

Error Handling tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > Error Handling Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         // try-catch works Synchronously, try-catch is used for handle Error         // Example 1 :         // try {         //     console.log("Start of Try");         //     blabla();         //     console.log("End of Try");         // }         // catch(error) {     ...

Strict Mode tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > String Mode Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         // NOTE: WHEN WE USE JAVASCRIPT CODE THEN IT IS GOOD PRACTICE TO USE "use strict" AT THE STARTING OF CODE.         "use strict" ;         // Example 1 :         // "use strict";         // a = 10;         // console.log(a);         // Example 2 :         // "use strict";         // function...

Generators tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > Generators Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         //Example 1 :         // function* generateit() {         //     console.log("First Message");         //     yield "Yield No. 1"; //Here Statement will be Pause, To remove the Pause we have to call next() method again as shown below         //     console.log("Second Message");         //     yield "Yield No. ...

Iterators tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > Iterators Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         //Example 1 :         let numbers = [ 100 , 200 , 300 , 400 , 500 ];         console . log ( typeof numbers [ Symbol . iterator ]);         let iter = numbers [ Symbol . iterator ]();         console . log ( iter );         console . log ( iter . next ());   //When next value is present then in output(console), "done: false" will show  ...

Symbols tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > Symbols Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         //Here Symbol means "A Unique Value"         let id1 = Symbol ( "Hello World" );         let id2 = Symbol ( "Hello World" );         console . log ( id1 );         console . log ( typeof id1 );         console . log ( id1 == id2 );     //Here both "id1" and "id2" are Unique Value(Because of Symbol)         let str1 ...

Async and Await Method tutorial in Advance JavaScript

Image
  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > Async Await Advance JavaScript </ title >     < link rel = "stylesheet" href = "" > </ head > < body >     < script >         //async function returns Promise         //Example 1 :         // async function test() {         //     return "Hello";         // }         // test().then((result) => {         //     console.log(result);         // });         //Example 2 :       ...