Created
January 20, 2018 05:52
-
-
Save duaneleem/a8f49a0167fa65d707dd1ee047672c4a to your computer and use it in GitHub Desktop.
Documentation example.
This file contains 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
/** Class representing a point. */ | |
class Point { | |
/** | |
* Create a point. | |
* @param {number} x - The x value. | |
* @param {number} y - The y value. | |
*/ | |
constructor(x, y) { | |
// ... | |
} | |
/** | |
* Get the x value. | |
* @return {number} The x value. | |
*/ | |
getX() { | |
// ... | |
} | |
/** | |
* Get the y value. | |
* @return {number} The y value. | |
*/ | |
getY() { | |
// ... | |
} | |
/** | |
* Convert a string containing two comma-separated numbers into a point. | |
* @param {string} str - The string containing two comma-separated numbers. | |
* @return {Point} A Point object. | |
*/ | |
static fromString(str) { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment