My Blog List

Saturday, February 18, 2012

JavaScript - Overview

Recently I have attended a session on JavaScript basics and very eager to know something we don't know. I am here to discuss some points about JavaScript.

-- Basically JavaScript is an Object-Oriented Scripting Language but no relation with Java. Only name have relation.
-- Engineer from Netscape company created Scripting Language "Mocha" for their browser Netscape Navigator. Then renamed as LiveScript.
-- Then Microsoft created their implementation of Scripting Language for their browser and named as JScript for IE.
-- Then ECMA(European Computers Manufacturers Association) took and standardized as ECMA Script. But for marketing purpose they named as JavaScript because Java is familiar in the world.
-- We can also create classes using Prototypes like

  1. function myClass(){
  2.     //some definition
  3. }
  4.  
  5. myClass.prototype.function = myFunc1() {
  6.     // Some function definition
  7. }
-- Dynamic variable types - No static types of variables. All are variants here. No need to worry about variable types.
-- Anonymous functions ie. Assigning a function definition to a variable without function name.
  1. var myVariable = function() {
  2.    //some definition
  3. }
-- Closures - Nested functions. Inner function will access the outer function's details but Outer function can't access inner function's details.
-- The Scripts are executed by JavaScript engine provided by respective browsers.
    IE - Chakra
    Mozilla - TraceMonkey, JagerMonkey
    Chrome - V8 engine
    Safari - Nitro
-- These Engines are called as Interpreter OR you can take it as JavaScript Virtual Machine.

Hope this will give idea about JavaScript. I will continue this post later....

1 comment:

  1. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium

    ReplyDelete