Pinterest Stumbleupon Whatsapp
Ads by Google

what is javascriptJavaScript has an interesting bit of history. Originally developed at Netscape as Mocha, it came to the forefront with official announcement in 1995. It was then developed independently by different parties, most notable of which was JScript by Microsoft.

Obviously a standardized implementation was needed, which led to its submission to ECMA international. Thus ECMAScript was formed. These days, most browsers support ECMA-262 which is also more commonly (and often vaguely) known as JavaScript.


What is Javascript? Javascript is rightly called the language of the Web. Each newer browser version pushes the bar higher in terms of JavaScript execution speeds. This is an important performance parameter these days as sites make extensive use of JavaScript. JavaScript led the Web 2.0 revolution with AJAX. Using JavaScript, sites can send HTTP requests behind the scenes and customize or update certain sections of the site, tailored to a particular user’s needs. This does away with complete page refreshes and makes the user interface a lot more powerful and user friendly.

Hello World of JavaScript

The Hello World example is almost customary to include when talking about programming languages. So here we go

<script>
document.write("Hello, World!");
</script>

You can also pop alert boxes just as easily with:
<script>
document.alert("Hello, World!");
</script>

Ads by Google

what is javascript

Yeah, that is all you need. No need to include any file or import any packages. Everything that is needed to execute JavaScript is provided by the browser (or the client) so it is also called Client Side Scripting Language. Why client side? To answer this question, you would have to look into how JavaScript works.

How It Works

The browser fetches a page which might have embedded JavaScript as we saw above, or refers to a separate JavaScript file in which case that file is also fetched by the browser.

what is javascript

Next up, depending upon what you want your JavaScript code to do and how you structured it, it will either execute as soon as the file loads or wait for a triggering event (like a click, or load).

javascript

Finally, when it’s all good, the code is executed line by line. JavaScript is an interpreted language, which means you don’t need to compile the code into another form to execute it. All of the changes you make, instantly take effect.

Comparing Other Programming Languages

Contrary to what the name might suggest, JavaScript is actually very different to Java. There are some similarities in the syntax, but that’s about it. JavaScript is loosely typed (you don’t have to define the datatype of variables) while Java is not. JavaScript is mainly executed in a browser, where as Java can be used to create stand alone applications. Java has a much wider area of application as compared to JavaScript which largely lives inside the browser.

JavaScript is Object Oriented but unlike other programming language that implement inheritance via classes, JavaScript does so via prototypes. JavaScript also has the largest install base (arguably) since it is bundled with all the major web browsers these days.

I have merely scratched the surface when you consider that it is a full blown programming language, and that it has all the buzz and develop going for it these days. There are plenty of JavaScript libraries, server side JavaScript and other projects that push the realms and applications of JavaScript to a whole new level. If you are starting out on JavaScript there are few tutorials that will help you along. Once you are up to speed and enjoy what you are doing, you can pick up The Rhino Book and enhance your JavaScript skills even further.

Have you ever tried to program with JavaScript? How was the experience?

  1. joshuaWojkj
    September 29, 2016 at 10:31 am

    oh this is a great meme. i love it

  2. bob
    August 31, 2016 at 3:58 pm

    Back in my college days, I used to use a ton of JavaScript code for my web projects. Everything from creating order forms to pop-up windows, mouse-overs and drop-down menus could be done quite niftily in JavaScript. Sure there was DHTML for menu creation, but JS seemed some much cooler

  3. JavaScript Media Player
    July 25, 2010 at 6:32 am

    very cool & good js tips, thank you very much for sharing.

  4. yuregininsesi
    June 27, 2010 at 1:43 pm

    Back in my college days, I used to use a ton of JavaScript code for my web projects. Everything from creating order forms to pop-up windows, mouse-overs and drop-down menus could be done quite niftily in JavaScript. Sure there was DHTML for menu creation, but JS seemed some much cooler

  5. Nat Jay
    June 14, 2010 at 7:38 am

    Back in my college days, I used to use a ton of JavaScript code for my web projects. Everything from creating order forms to pop-up windows, mouse-overs and drop-down menus could be done quite niftily in JavaScript. Sure there was DHTML for menu creation, but JS seemed some much cooler.

    In many ways, it's like the "coding glue" that holds a web page together by giving it additional functionality beyond plain HTML.

Leave a Reply

Your email address will not be published. Required fields are marked *