Chapter 1: JavaScript – A Client-Side Scripting Language

Its been long since my last post. After a long time I have got this day a little free time myself so does for you. Many a time peoples ask me of teaching them JavaScript, well then I thought why not write a tutorial for them! Well here we go. If any of you find anything wrong let me know. I am not the inventor of JavaScript, so I don’t know all. Okay, enough with the chatting, lets start …

JavaScript is probably the most sophisticated client-side scripting language I have ever seen. We have VBScript, we have C#, we have PHP, but none of them can match the functionality, features and dynamism that JavaScript possesses.

If you are intermediate to JavaScript, you can skip this post and go forward, but if you need to know about what is a client-side¬†scripting language, read it. A client-side scripting language is different from a programming language in so many ways –

  • Firstly, unlike a programming language, a scripting language is never ever compiled to build an output binary file, instead they are executed one statement at a time and execution breaks if any errors occur or the code finishes.
  • Secondly, a client-side scripting language run in a specific environment, in other words, inside a browser and is fully dependent on the browser to give it all kinds of supports. Whereas, a programming language output runs on an operating system.

You might have notice the fact that I am saying client-side scripting language not simply scripting language. Thats because a scripting language normally runs in a script host on the server machine. All the codes of the scripting language is run and the output is sent back as mere HTML markup to the client side. But JavaScript is never run in the server, instead it is sent as it is to the client side with the HTML markup. Then it is the client’s responsibility to run the code and show the output to the user and by clients I mean, your browser – ¬†Internet Explorer, FireFox, Opera, Chrome, Safari; whatever that might be.
But beware of that fact that, not all these browsers user the same JavaScript engine, and thus you might need to check if the browser support your specific JavaScript codes. But don’t be alarmed, almost all the browser support almost all kinds of functionalities, there are few exceptions, but they are not so frequently used.