JSDoc
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
JSDoc janë komente /** ... */ mbi funksionet që përshkruajnë parametrat dhe vlerën kthyese me @param dhe @returns. Editori (VS Code) i lexon dhe të jep plotësim e kontroll tipesh, edhe pa TypeScript.
EnglishEN
JSDoc is /** ... */ comments above functions describing parameters and return values with @param and @returns. The editor (VS Code) reads them and gives you autocomplete and type checks, even without TypeScript.
Si ta mendosh
Si etiketa e udhëzimeve në pjesën e pasme të një pajisjeje.
Lexoje në anglisht
Like the instruction label on the back of an appliance.
Shembull kodijavascript
/**
* @param {number[]} notat
* @returns {number} mesatarja
*/
const mesatarja = (notat) => notat.reduce((a, b) => a + b) / notat.length;