- An Hello World demo
- JS Bin / CodePen / JSFiddle / JSDB- a handy tool for you.
- It is a scripting language with no static/void/main.
- The language of the browser to handle scripting activities.
- Its a dynamic language which means that one can modify the objects/types on the fly.
- It supports function programming and object-oriented features like other languages for example - Ruby, C#, etc.
- It is very simple to learn and is very small/compact.
- It is a powerful and highly flexible language.
To boost your interest to learn this language:
- A good example of a rich client interfaces in the the browser that you might be aware of or have used is Google Docs Interface where you can just start typing, give formatting from the toolbars, use drawing tools to draw different shapes, etc.
- Another example can be Processingjs, if you love animation. Try spending some time on the demos available on Processingjs website.
- Go to BallDropping website and play with small white balls. It’s a Chrome Experiment.
- Also, when playing with above demos, don’t forget to open your system’s task manager to see the CPU usage (especially for ball dropping animation, if you add many balls). You must know that even though it is possible to create such animations but sometimes, it’s not the efficient way to achieve those animations.
- Developed by Brendan Eich.
- First version - Netscape 2.0 (1995)
- Working with DOM within browser was somewhat odd because of different browser notations.
- To ease the cross-browser development, frameworks like prototype and jQuery were and still are a great help.
An Hello World demo
- Also, one needs to understand that all the browsers renders a webpage from top to bottom, so if you write a heavy script block or which needs some action by a user as in demo above, you won’t be able to see the rest of the content below the script tag because it has not been rendered it.
- To avoid the above problem, you should practise to include all your scripts just above the body end tag which will help in better performance of your webpage as it will load fast. Alternatively, you can run a script when the webpage has finished loading in the browser (example - window.onLoad() or jQuery’s ready() method).