Previous
Next
CSE775 - Distributed Objects

JavaScript Demo1 - Core Language

Styles:

indented text
colored text

Scripts:

Types and Variables:


Undefined:
Null:
Boolean:
Number:
Reference:
string:
Array:
Object:
Function:

All value types occupy a fixed size in memory and come and go as functions are called and return. Reference types are garbage collected. They are created with the keywork "new" when calling a constructor function (more about that later) or for objects, arrays, and strings can be created from literals. Reference types live in a JavaScript managed heap.

Events:

There are UI, Keyboard, Mouse, Focus, and Mutation Events

Click me
If you put scripts anywhere in the body of the document before its end, the script won't have the complete document to process. That's why it is common to put scripts at the end or trigger them from a body "onload" event.