Reputation: 380
I'm working on a project and I see structures like this in a lot parts of the code. My question is what is this and it actually do, since it's wrapped around with the comment marker.
/**
*
* @param {String} message
*/
Upvotes: 0
Views: 865
Reputation: 2861
As you say, this is just a block comment in general. What confuses you is a convention regarding javascript comments. Because the language is not typed, there are some comment conventions in place just to unify the way we "talk" about js code in comments. Nothing magical happens with the line
* @param {String} message
All it says to the next developer is that this code has a parameter named message, of type string. Thats it.
Take a look for more info here, it all comes down to "how you should document js code in comments inside the js file", nothing more
Upvotes: 2