Window === Global
window there and you can see the what inside this window object
When we are on the Browser we can access to the window, but there is no window in the computer. So how we can use that ?
Even after installing the npm, it doesn’t give us to access those
window object so how should we do it ?
Well good thing is we can access the window here to, it just changed it’s name. It called global now.
You can go to latest doc of node js by https://nodejs.org/dist/latest-v12.x/docs/api/
Good thing is you can access the
global object which is same as
Now you can use all the functions like – setInterval, setTimeout etc on app.js
See an example –
Run the code by
Did you understand today’s lesson ?
You can comment anytime if you’ve any question!