I wrote a javascript function that processes data and returns an object with a specific format.
function processData(itemToProcess){
var information = itemToProcess.extractInformation();
var returnedInfo = {
"firstAttribute": information[0],
"secondAttribute": information[1]
};
return returnedInfo;
}
I would like to specify for the @returns field the format of the returned object, but I don't know if there is a proper way to do it, or if I just have to format it on my own, like:
@returns : an object with the information formatted as:
- firstAttribute: this attribute is the most important
- secondAttribute: this attribute is the second most important
Is there a specific, proper way to document returned objects in Javascript, or is the coder's choice?
Thank you for your help.