img-rotate img-rotate img-rotate img-rotate img-rotate img-rotate

Javascript Basic

JavaScript Introduction

JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as [...]

JavaScript How To

The HTML <script> tag is used to insert a JavaScript into an HTML page.

Put a JavaScript into an [...]

JavaScript Where To

JavaScripts in the body section will be executed WHILE the page loads.
JavaScripts in the head section will be [...]

JavaScript Statements

JavaScript is a sequence of statements to be executed by the browser.

JavaScript is Case Sensitive
Unlike HTML, JavaScript is [...]

JavaScript Comments

JavaScript comments can be used to make the code more readable.

JavaScript Comments
Comments can be added to explain the [...]

JavaScript Variables

Variables are "containers" for storing information.

Do You Remember Algebra From School?
Do you remember algebra from school? x=5, y=6, z=x+y
Do you [...]

JavaScript Operators

= is used to assign values.
+ is used to add values.

The assignment operator = is used to assign values to [...]

JavaScript Comparison and Logical Operators

Comparison and Logical operators are used to test for true or false.

Comparison Operators
Comparison operators are used in logical [...]

JavaScript If…Else Statements

Conditional statements are used to perform different actions based on different conditions.

Conditional Statements
Very often when you write code, [...]

JavaScript Switch Statement

Conditional statements are used to perform different actions based on different conditions.

The JavaScript Switch Statement
Use the switch statement [...]

JavaScript Popup Boxes

JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box.

Alert Box
An alert box is [...]

JavaScript Functions

A function will be executed by an event or by a call to the function.

JavaScript Functions
To keep the [...]

JavaScript For Loop

Loops execute a block of code a specified number of times, or while a specified condition is true.

JavaScript Loops
Often [...]

JavaScript While Loop

Loops execute a block of code a specified number of times, or while a specified condition is true.

The while [...]

JavaScript Break and Continue Statements

The break Statement
The break statement will break the loop and continue executing the code that follows after the [...]

JavaScript For…In Statement

JavaScript For…In Statement
The for…in statement loops through the elements of an array or through the properties of an [...]

JavaScript Events

Events are actions that can be detected by JavaScript.

Events
By using JavaScript, we have the ability to create dynamic web pages. [...]

JavaScript Try…Catch Statement

The try…catch statement allows you to test a block of code for errors.

JavaScript – Catching Errors
When [...]

JavaScript Throw Statement

The throw statement allows you to create an exception.

The Throw Statement
The throw statement allows you to create an exception. If [...]

JavaScript Special Characters

In JavaScript you can add special characters to a text string by using the backslash sign.

Insert Special Characters
The [...]

JavaScript Guidelines

Some other important things to know when scripting with JavaScript. 

JavaScript is Case Sensitive
A function named "myfunction" is not [...]