Historically speaking, JavaScript was only commonly but sparingly used in web development. The multiple browsers in use at the time each supported different versions of JavaScript and were slow to render more complex Javascript.
As time progressed, JavaScript became more and more important in creating rich applications that behaved more like desktop applications. Asynchronous Javascript and XML (AJAX) allowed applications to interact with server-side code without requiring a page reload. Fast forward to today and with the introduction of new frameworks like React and increased browser speed, developers are creating entire applications in JavaScript.