Is used for online form submissions and animations.
It is the Defacto client-side scripting language of browsers, a popular choice on servers as well.
- V8 – in Chrome and Opera.
- SpiderMonkey – in Firefox.
- ChakraCore - in Microsoft Edge.
- Nitro or SquirrelFish - in Safari
- can run multiple tasks simultaneously without blocking any of the tasks (Asynchronous)
- can exchange data asynchronously with a server across a network (Fetch API or AJAX)
- can react to user actions such as mouse click, keypress, etc (event handling)
- can switch between tasks in a single-threaded execution (concurrency)
- can make use of object-oriented concepts (prototype-based Object Model)
- can manipulate DOM of the browser to change the display of the webpage
- can store data locally on browsers (cookies, local storage, etc)
Restrictions placed in the browser for the sake of data safety
- Does not provide low-level CPU and memory access
- Cannot implicitly access files or OS functions
- users need to explicitly provide file access by input tags as well as for input device access such as camera and microphone, cannot access other tabs of the browser.