Package Management

NPM is used for package management.

curl | tar xz --strip-components=1

This will install node and npm in /usr/local/bin.


Netbeans 8.0 has good JavaScript and even AngularJS support.

See Integrated AngularJS Development

Project Setup

File ⇒ New Project ⇒ HTML5 sets up a JavaScript project.

On Step 3 Site Template AngularJS Seed can be selected.

Additional JavaScript libraries can be selected on step 4.

This will not completely setup the new project.

npm install

needs to be executed from the command line in the project directory.



Console Output

Output can be written by using the console.

console.log("My information");

Lifetime of Variables

The lifetime of a JavaScript variable starts when it is declared.

Local variables are deleted when the function is completed.

Global variables are deleted when you close the page.

Number Properties

  • NaN
  • prototype
  • constructor

Number properties belongs to JavaScript's number object wrapper called Number.

These properties can only be accessed as Number.MAX_VALUE.

Using num.MAX_VALUE, where num is a variable, expression, or value, will return undefined.