🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1862

Re: pls explain abt prototype

#1862
From: Harbs
Date: Tue, 20 Jan 2009 21:16
22 lines
1173 bytes
Thomas_B._Nielsen@adobeforums.com wrote:
> For prototyping in javacript there is loads of info on the net.
> Example: <http://www.w3schools.com/jsref/jsref_prototype_math.asp>
>   

Huh? What do you gain by prototyping in that example?

The following works just as well:

function employee(name,jobtitle,born)
{
this.name=name;
this.jobtitle=jobtitle;
this.born=born;
}

var fred=new employee("Fred Flintstone","Caveman",1970);
fred.salary=20000;

-- 
Harbs
http://www.in-tools.com
Technical Details
Message-ID: <859B1F6D0F3E1FCF27AD0D04CAE16809@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b78cbc.-1@webcrossing.la2eafNXanI> <59b78cbc.0@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ba3fc2ccca9a708d
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Harbs
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: pls explain abt prototype
Message-ID: <859B1F6D0F3E1FCF27AD0D04CAE16809@in.webcrossing.la2eafNXanI>
Date: Tue, 20 Jan 2009 13:16:16 -0800
References: <59b78cbc.-1@webcrossing.la2eafNXanI> <59b78cbc.0@webcrossing.la2eafNXanI>
Lines: 23
User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421)
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit