- JavaScript in browser
- JavaScript Object Notation (JSON)
- Execution flow
- Memory management
- Dependency management
- References
JavaScript was created as a browser-only language to integrate with HTML/CSS, but nowadays it is used on various devices.
JavaScript in browser
JavaScript in browser is configured to be safe to the users. Therefore, it cannot: - Access kernel functions. - Know the existence of other browser tabs unless one tab uses JavaScript to open another one. - Request data from a server with different origin unless configured.
JavaScript Object Notation (JSON)
JSON is the native data format for JavaScript.
We use camelCase for JSON field names because of its consistency with JavaScript variable names.
Execution flow
- The JavaScript engine reads, parses, and compiles the script into machine code.
- The engine executes the machine code.