What is JavaScript?

If you are taking this course, you know that JavaScript is a popular client-side programming language. Client-side programs run on your computer's web browser. So, where can you see JavasScript on the web? When you visit a website and submit a form, that's JavaScript. The language is easy to use and learn. This article introduces several features of the language and some of the things you can do with it. 

Server-side versus client-side code

You might also hear the terms server-side and client-side code, especially in the context of web development. Client-side code is code that is run on the user's computer - when a web page is viewed, the page's client-side code is downloaded, then run and displayed by the browser. In this module we are explicitly talking about client-side JavaScript.

Server-side code on the other hand is run on the server, then its results are downloaded and displayed in the browser. Examples of popular server-side web languages include PHP, Python, Ruby, ASP.NET and... JavaScript! JavaScript can also be used as a server-side language, for example in the popular Node.js environment - you can find out more about server-side JavaScript in our Dynamic Websites – Server-side programming topic.