JavaScript in browser
JavaScript was initially created to make web pages alive. JS can be written right in a web page's HTML to make it interactive.
The browser has an embedded engine called the JavaScript engine or the javascript runtime.
JavaScript's ability in the browser is very limited to protect the user's safety. For example, a webpage on https:/goofle.com cannot access https:/codewear.com and steal information from there.
Developers tools
Every browser has some developer tools which make a developer's life a lot easier
F12 on Chrome opens Dev tools
Elements | Console | Networks |
all HTML elements | all the errors + logs | all network requests |
We can also write javascript commands in the console.