JavaScript/Reserved words/new

Previous: native Reserved words Next: package

The new keywordEdit

The new keyword is an operator that creates an object without members, calls it's constructor function with itself as the this operator, which initialises the object.

ExamplesEdit

  theArray = new Array();
  theDate = new Date("Jan 3 1962");
  theObject = new Object;
Previous: native Reserved words Next: package