- From: Eliezer Bernart <eliezer.bernart@gmail.com>
- Date: Fri, 27 Dec 2013 16:06:15 -0200
- To: Max Polk <maxpolk@gmail.com>
- Cc: Julee Burdekin <jburdeki@adobe.com>, Webplatform List <public-webplatform@w3.org>, Douglas Schepers <schepers@w3.org>
- Message-ID: <CAAECTTTrV_Svn=DJatJLEqhPXj-whJTxXCbBjgaHc0TttjK-4Q@mail.gmail.com>
I agree! Prototype is a little bit confusing. But I don't think that JS_Example will be a good name, since we have the other examples... A good solution for me it will be merge JS_Prototype with JS_Parameter, but keep the JS_Parameter name. {{JS Parameter Value |Name=arrayObj |Required=true |Description=The variable name to which the '''Array''' object is assigned. |Example=arrayObj = new Array() }} I made some updated on the Templates, and the Form in the last days Max, I opened a Task on http://project.webplatform.org/msdnjs/issues/msjs-5. If you don't mind in give a check to see if I'm in the way or if there is something that I'm doing wrong. All my changes are being applied at http://docs.webplatform.org/test/javascript/Array What do you think? Eliezer @eliezerbernart eliezerb On Fri, Dec 27, 2013 at 3:51 PM, Max Polk <maxpolk@gmail.com> wrote: > On 12/25/2013 11:06 PM, Eliezer Bernart wrote: > > > *Prototype * > ** A basic sample of different prototypes to the object.* > > > I have a change of heart. It feels that we should not use the word > "Prototype" to describe examples at the top. While the word "prototype" in > English means one thing, it has a very different meaning in JavaScript, and > we will cause confusion and lots of questions doing so. Let us use another > word, perhaps Example. > > Also, I feel we should merge JS_Protype and JS_Parameter since they > contextually are highly coupled What would you think of this. > > BEFORE (simple mediawiki text): > > arrayObj = new Array() > arrayObj = new Array([ size ]) > arrayObj = new Array([ element0 [, element1 [, ...[, elementN ]]]]) > > arrayObj: Required. The variable name to which the '''Array''' object is > assigned. > size: Optional. The size of the array. As arrays are zero-based, created > elements will have indexes from zero to size -1. > element0,...,elementN: Optional. The elements to place in the array. This > creates an array with n + 1 elements, and a '''length''' of n + 1. Using > this syntax, you must supply more than one element. > > AFTER (three examples, each with their independent set of parameters): > > {{JS_Example > | Example=arrayObj = new Array() > | Parameter1=arrayObj: Required. The variable name to which the > '''Array''' object is assigned. > }} > > {{JS_Example > | Example=arrayObj = new Array([ size ]) > | Parameter1=arrayObj: Required. The variable name to which the > '''Array''' object is assigned. > | Parameter2=size: Optional. The size of the array. As arrays are > zero-based, created elements will have indexes from zero to size -1. > }} > > {{JS_Example > | Example=arrayObj = new Array([ element0 [, element1 [, ...[, elementN > ]]]]) > | Parameter1=arrayObj: Required. The variable name to which the > '''Array''' object is assigned. > | Parameter2=size: Optional. The size of the array. As arrays are > zero-based, created elements will have indexes from zero to size -1. > | Parameter3=element0,...,elementN: Optional. The elements to place in the > array. This creates an array with n + 1 elements, and a '''length''' of n + > 1. Using this syntax, you must supply more than one element. > }} > > Some duplication, but since it's highly coupled, it makes it easier to add > examples as independent units. Like? Dislike? >
Received on Friday, 27 December 2013 18:06:43 UTC