Data Types, Operators & Primitives
Learn JS Fundamentals to jQuery & Pure DOM Scripting
Basic Data Types
Primitive Data Types
Undefined
Null
undefined
(a variable that has not been set yet)Null
null
(the null pointer - usually set by intent in the code)Boolean
true
String
"hello"
Number
2
(and also NaN
)Object Data Types
Object
{name:"value"}
Array
[1,2,3]
Date
new Date()
RegExp
/.*/g
Function
function(){}
Operators
var
var foo
new
new Foo
assignment
delete
delete foo.bar
there's no real deleting, it just deletes the referencemember
foo.bar
call
bar()
comparison
==
===