JAVASCRIPT

 Home  Computers & Internet  Web Programming JAVASCRIPT
What is Javascript?
Javascript Placement
Syntax
Reserved Words
Variables
Data Types
Escaping Characters
Concatenation
Arithmetic Operators
Assignment Operators
Comparison Operators
Boolean Operators
Conditional Operator
If Statements
Else If Statements
If Else Statements
Switch Statements
While Loops
For Loops
Do While Loops
Break Statement
Continue Statement
prompt()
alert()
Date()
Event Handlers
String Object Methods
Math Object Methods
Window Object Methods

JAVASCRIPT DATA TYPES

Javascript variables can store three of the main data types automatically without first having to declare beforehand what these data types are.

These three main data types are strings, numbers and boolean values (ie. true or false).

Examples:

Store strings

var username="John25";
var name="Mary Smith";
var email="john@somesite.com";

Store numbers

var total_eggs= 25;
var tax_rate= 0.14;
var population = 1246799;

Store Boolean Values

var people_present = true;
var did_buy = false;

Home | Privacy Policy | Terms Of Use | Contact Us