The magic inside javascript for-loops

Welcome JsDev's, Working with for loops are always complicated, mostly for-loops inside async blocks. so here are some examples where i felt OMG, what is happening, Example 1: for(var i=0; i<3; i++) { setTimeout(()=>console.log(i)); } Output: 3 3 3 How? Lexical scoping and closures:…

AMP-The super speed.

What is it? AMP(Accelerated Mobile Pages project) was an open source project, and owned by technology giant Google.Inc, now the subsidiary of Alphabet. Later, collaboration by publishers and technology companies such as Twitter, Pinterest, WordPress, Chartbeat, Parse.ly, Adobe Analytics and LinkedIn made AMP very popular In short,…