Javascript is a client side interpreted programming language that was introduced in 1995 when Netscape Navigator browser was released. At the time, the idea to use this programming script is to handle validation input on client side before sending the request over to the server. In 1995, the internet speed was really slow and by using the validation checking, it helps reducing the round trips from browser to the server, thus will reduce the time waiting for users.
Nowadays, Javascript is so more popular and not only be used in web browsers, but also in mobile, tv and other electronic items.