JavaScript Advance
JavaScript Advance
JavaScript Advance
Topics
Dom, Dom Manipulation, Setting CSS Styles using JavaScript,
Classes and Inheritance, Iterators and Generators, Promise, Client-
Server Communication, Fetch, Asynchronous JavaScript
Difference b/w DOM object and WINDOW object
For example
document.querySelector()
WEB APIs are basically libraries
that are also written in JS and are
automatically available for you to
use.
Synchronous JavaScript
THREAD OF
EXECUTIO
N
Blocking
THREAD OF BACKGROUND
EXECUTIO
Callback will run
N
after timer Timer
running
REQUEST WEB
CLIENT
SERVER
💻
(e.g. Browser)
🌐
RESPONSE
Sending Data Back
Callback Function
Example of Callback
Variablename.forEach(function(value,index,array)
A Simple Promise
let obj ={
value1:number,
You want to use value2:number
for...of loop on }
this object literal
🏷 You can think of generators as a kind of function which can return multiple
values in phases.
🏷 The function* is the keyword used to define a generator function.
🏷 yield is an operator which pauses the generator.
🏷 yield also helps us to receive input & send output.
Generators Example