Category Archives: JavaScript

Introduction to JavaScript

Before learning JavaScript you should have basic knowledge of HTML and CSS, be able to use a HTML editor such as Notepad and
an Internet browser such as Mozilla Firefox.

JavaScript and Java are two different languages. Java is a full programming language, more powerful (but more complex) and it
must be compiled before a program can be executed. JavaScript is a scripting language which doesn’t need a compiler, it is simpler,
and more indulgent in some areas, such as syntax.

Continue reading

JavaScript variables

Table of content:

What is a variable?

A variable represents or hold a value.

Let’s consider the very commonly use example x=2. The name of the variable would be x and its value would be 2. The value of a variable can be changed at any given time simply by giving x a new assignment. For example x=4.

Consider the following math problem:
If x=2, then 3+x=?

Continue reading

JavaScript functions

Table of content:

What is a function in JavaScript?

A function is a piece of script within another larger script. A function is use to perform one or multiple tasks according to what code is placed inside it.

Functions can be use to organize a script into parts that accomplish different things. Functions can be reused as many times as you wish by simply calling the function again.

Continue reading

JavaScript operators

Table of content:

What are JavaScript operators

A JavaScript operator is a symbol or a word that performs a calculation, comparison, or assignment on one or more values. JavaScript operators do much of the work in script. There are many types of JavaScript operators.

Continue reading