formats

js4 – Arithmetic 2

There are some additional operators for arithmetic in java script that are very useful. Most of them become more useful later. First are the increment and decrements operators, (++) and (–) respectively. They are pretty simple to use, as you can see from the sample below, but there is something important to notice. These operators may be used as a prefix or suffix, which

(More)…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

js3 – Arithmetic 1

Now that we can store data inside of variables lets begin to look at basic math operations. Math works pretty much how you would expect, you can add, subtract, divide, multiply; you can use both integer arithmetic and floating point arithmetic. When a number contains a decimal we call it a ‘float’, otherwise an ‘int’ or ‘integer’. We will write a program to find

(More)…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

js2 – Variables

The last example we saw how we can use javascript to interact with the document. We were able to perform the ‘write’ action and it displayed the ‘string’ that we told it. In programming though we will not always have our data given directly to out actions like we did there. Usually it will be in some container that we made. Creating the containers

(More)…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

js1 – Hello World

So lets start learning javascript from the beginning. We will write a program that is written by many beginner programmers, “Hello World!”. The beauty of javascript is that you can use a basic text editor to create/edit it and any browser to execute it. It gets even more interesting when the browser is used as the text editor. There are some websites dedicated to

(More)…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© 2012 mashumafi.com
credit