public
Last active

js commentation example

  • Download Gist
commentexample.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
/* js comment format collection */
 
/*!
* script name
*
* @author : Takeshi Takatsudo (takazudo[at]gmail.com)
* @copyright : Takeshi Takatsudo
* @license : The MIT License
* @link : http://.....
* @modified : 2011/04/26 HH:MM:SS
*
* some comments here
*/
 
/**
* @tag value
*/
 
/**
* Reverse a string
*
* @param {String} input String to reverse
* @return {String} The reversed string
*/
var reverse = function(input){
// do something
return output;
};
 
/**
* Constructs Person objects
* @class Person
* @constructor
* @namespace MYAPP
* @param {String} first First name
* @param {String} last Last name
*/
MYAPP.Person = function(first, last){
...
};
 
/**
* Name of the person
* @property first_name
* @type String
*/
this.first_name = first;
 
/**
* Last (family) name of the person
* @property last_name
* @type String
*/
this.last_name = last;
 
/**
* Returns the name of the person object
*
* @method getName
* @return {String} The name of the person
*/
MYAPP.Person.prototype.getName = function(){
return this.first_name + ' ' + this.last_name;
};

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.