Marking "example usage" in code documentation
- by Ross
What the best practice of placing example usage in code documentation? Is there a standardised way? With an @usage or @notes?
For example:
/**
* My Function
* @param object id anObject
* @usage a code example here...
*/
function foo(id) {
}
or
/**
* My Function
* @param object id anObject
* @notes a code example here, maybe?
*/…