Created
June 10, 2011 08:34
-
-
Save Takazudo/1018468 to your computer and use it in GitHub Desktop.
js commentation example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment