javascript intro jbwyatt.com
EJS Sandbox   |   W3 tryIt   |   JS fiddle

Demonstrate Firebug Console

variables values, "types", + document.write() document.writeln() creates new document can write html!! getElementById() innerHTML style


.. a FUN SOB

There are six basic types of values: numbers, strings, booleans, objects, functions, and undefined values. typeof(); returns the type of value typeof(99); // returns number
Numbers are 64 bit floating point IEEE 754 normal operators PEMDAS Strings can be compared < , > Values can be compared, even when different types: 5 = = "5" is true 5 = = = "5" is false undefined vs. null int x; //undefined string s = null; // defined, but no value alert(); var x = 88; alert("The answer is " + x); ==> The answer is 88

Opens in new tab

intro
how to
where
comments
variables
operators
js statements