This post was originally published on my blog, find original post here
Being the first and the only scripting language that was supported natively by web browsers, it simply stuck
They don't need to be compiled to execute.They can be written in webpage and executed when web browser loads the web page.
- It can change existing HTML content,modify HTML styles, HTML attributes.
- It can validate input forms.
- React to user actions like mouse clicks, key presses
- Perform the calculation.
- send requests to server, get the data (AJAX)
- get and set cookies in the browser
- store the data in browser local storage