Child pages
  • Function
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Unknown macro: {div}

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Unknown macro: {div}


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Function

Unknown macro: {td}

constructor
Specifies the function that creates an object's prototype.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

length
Specifies the number of arguments expected by the function.


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

apply()
Applies the method of another object in the context of a different object (the calling object); arguments can be passed as an Array object.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

bind()
Creates a new function which, when called, itself calls this function in the context of the provided value, with a given sequence of arguments preceding any provided when the new function was called.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

call()
Calls (executes) a method of another object in the context of a different object (the calling object); arguments can be passed as they are.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

toString()
Returns a string representing the source code of the function.


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
constructor
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Specifies the function that creates an object's prototype.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Function

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
function Tree(name) {
	this.name = name;
}
theTree = new Tree("Redwood");
console.log("theTree.constructor is " + theTree.constructor);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
length
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Specifies the number of arguments expected by the function.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Number

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
function addNumbers(x, y){
	if (addNumbers.length == 2) {
		return (x + y);
	} else
		return 0;
}
Unknown macro: {tr}
Unknown macro: {td}


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
apply
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

apply

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Applies the method of another object in the context of a different object (the calling object); arguments can be passed as an Array object.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
function book(name, author) {
	this.name = name;
	this.author = author;
}

function book_with_topic(name, author, topic) {
	this.topic = topic;
	book.apply(this, arguments);
}
book_with_topic.prototype = new book();

var aBook = new book_with_topic("name","author","topic");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
bind
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

bind

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Creates a new function which, when called, itself calls this function in the context of the provided value, with a given sequence of arguments preceding any provided when the new function was called.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
var x = 9, 
	module = {
		getX: function() { 
		     return this.x;
		},
		x: 81
	};
//  "module.getX()" called, "module" is "this", "module.x" is returned
module.getX(); // > 81
//  "getX()" called, "this" is global, "x" is returned
getX(); // > 9
//  store a reference with "module" bound as "this"
var boundGetX = getX.bind(module);
//  "boundGetX()" called, "module" is "this" again, "module.x" is returned
boundGetX(); // > 81
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
call
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

call

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Calls (executes) a method of another object in the context of a different object (the calling object); arguments can be passed as they are.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
function book(name) {
	this.name = name;
}

function book_with_author(name, author) {
	this.author = author;
	book.call(this, name);
}
book_with_author.prototype = new book();

var aBook = new book_with_author("name","author");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
toString
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

toString

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Returns a string representing the source code of the function. Overrides the Object.toString method.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
function printHello() {
	return "Hello";
}
application.output(printHello.toString());
Unknown macro: {tr}
Unknown macro: {td}
  • No labels