JavaScript is one of the most popular programming languages that is mostly used for creating interactive web pages. Based on the jobs available on Indeed.com, JavaScript is third most demanded languages of 2019. It's fast and doesn't need to be compiled before use.
JavaScript is basically a scripting language that follows the rules of client-side programming. It runs on a web browser without any need of a web server or something else. It enables our code to interact with the browser and can even change or update both HTML and CSS. Though you can use JavaScript with REST APIs, XML, etc, it's not designed to develop applications, applets or large complex systems.
JavaScript was initially developed as a client-side programming language but after some time, developers have realized it can also be used for server-side programming. When JavaScript was growing, it's code becomes heavy and complex to such an extent that it was even not able to fulfill the requirements of Object-oriented programming.
This restricted the further growth of JavaScript as a server-side language. Then TypeScript came into existence to overcome the issues.