As the program runs on the client-side, the load on the web page server is reduced. Consequently, your site will respond faster, and users will perceive it.
Due to the flexibility of the language, companies like Google, Microsoft have developed frameworks adding the controller view model; this makes it easy to build web applications in a short time. This evolution allows running programs both on the server-side and on the computer. Therefore, you can program freely.