- To add a new dynamic HTML contents on web page, update specific part of web page and to add/remove dynamic CSS
- Handling user events like key press, touch, tap, mouse cursor movement etc.
- Share data between same application through Local Storage.
- Requesting server side resources with input parameters with multiple methods like POST,PUT,GET etc.
- Above all, Adding animations to web pages.
Every programming/scripting language gives array of rich features but this does not mean it can do anything. There are limitations too!
In Conclusion, most of the limitations are for the sake of security and user safety only.
Within Body tag
Within head tag
External .js file