Browser has the function of rendering HTML, the HTML source code in memory to form a DOM object, is the document object.
Inside the browser there is a JS interpreter/actuator/engine, such as Chrome's V8 engine.
In the HTML to write a JS code, JS code is executed by the engine, the result of execution is often the operation of the DOM-common effects (image floating, text discoloration, etc.)
The browser is "host", but the host of JS is not limited to the browser, it may be server-side (can be used to manipulate text, network, database, etc., such as the Server JS Framework: node. JS, which put the JS engine on the server to operate the server file, network)
Learn JavaScript to distinguish between:
The syntax of the ①JS language itself
②dom Object (body,div,p node tree as an object)
③bom object (Place the browser's address bar, history, DOM, and so on in an object)
JavaScript notes and summaries (2-1) JavaScript and DOM