10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Return Value<br />

Returns the function that created this object's instance.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript Date constructor Property<br />

<br />

<br />

<br />

var dt = new Date();<br />

document.write("dt.constructor is : " + dt.constructor);<br />

<br />

<br />

<br />

Output<br />

dt.constructor is : function Date() { [native code] }<br />

Prototype<br />

The prototype property allows you to add properties and methods to any object<br />

(Number, Boolean, String, Date, etc.).<br />

Note: Prototype is a global property which is available with almost all the<br />

objects.<br />

Syntax<br />

Its syntax is as follows:<br />

object.prototype.name = value<br />

222

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!