Page 1 of 1

JavaScriptDocumentor

Posted: Wed Mar 28, 2007 6:45 am
by Ollie Saunders
Google doesn't seem to think it exists, is that true?
Are there any documentation/commenting conventions for Javascript?
What do you do?

For now I'm doing things like this:

Code: Select all

/**
 * Returns the value of a single randomly choice element from specified array
 *
 * @param Array choices to pick from
 * @return Mixed
 */
var pickFromArray = function(choices)
{
    return choices[Math.round(Math.random() * (choices.length - 1))];
}
But I'm quite sure "mixed" is very PHP specific term, so can anyone suggest anything better?

Posted: Thu Mar 29, 2007 7:59 am
by Benjamin
IMHO you have lost your mind but I'm probably confused.

Posted: Thu Mar 29, 2007 8:02 am
by Ollie Saunders
What makes you say that?