Sunday, 20 January 2013

Unique Content Article on software, applications, business, finance, sales, marketing

How To Learn JavaScript The Easy Way


by Shanna McNeil


Before starting to learn JavaScript, or any programming language for that matter, it is always a good idea to take a minute to understand what it is used for. Not to mention what kind of functionality it is capable of providing for in said application. For starters, readers should know that JS is one of the languages used by web browsers. To be more specific, it is a client-side programming language that is platform independent.

This means that a piece of JS code inserted into the HTML source code of a web page is automatically executed by the browser. It does not need to be compiled in order to be executed as a program. If this sounds too geeky or confusing, just ignore it and continue reading.

A JS script can be used to make a static HTML/CSS web page interactive. A good grasp of web page design elements and working knowledge of HTML and CSS is required before getting started with JavaScript. It does not, however, need any prior skills in programming. This makes it an ideal first choice for wannabe programmers.

This might also be a good time to clear up any confusion regarding the differences between Java, JS, and jQuery. The first two are object oriented programming (OOP) languages with similar structures. JS has a simple syntax and not too many complexities. JQuery is a JS library with prebuilt blocks of code. Its use will reduce the amount of coding work that needs to be done.

There is not much in the form of preparation required for getting started with JS. It does not need a development environment, compiler, debugger, or other standard tools of the programming trade. There is no downloadable software to be installed in order to make this work. The only thing that has to be done is to write the code in a text file. Save the file and open it up in a browser.

It might be easier to grasp by looking at a sample piece of code and testing it in a browser. The syntax could not possibly be any easier. The JS script will be the one inside the tag, which lets the browser know this is not a part of the HTML. Adding the type="text/javascript" attribute to the script tag indicates this script is a snippet of JS code.

The rest of it is mostly about learning how to create variables, arrays and objects, and assign values and properties to them. Try using all this in simple loops and conditional statements. It would be impossible in this short space to explain in more detail the logic behind object-oriented programming and the exact syntax used in JS. Let's just say that JS makes it a lot easier as compared to C, C++, or Java.

The next stage after that is to try more complex applications using jQuery and other libraries. These libraries have pre-coded functions that can be called from within the script, thus saving the time and effort required to code all of it from scratch. Anyone who is still reading and understood most of what has been said above should be able to learn JavaScript within a few hours.




About the Author:





You are receiving this because you signed up for it on 2011-10-03 from IP 203.109.66.181


To fine-tune your selection of which articles to receive, just login here
using your username:


To unsubscribe please use the following link:

Unsubscribe



No comments:

Post a Comment