add jsdoc

This commit is contained in:
2024-08-26 12:23:11 +05:30
parent e863475b2d
commit 300265bc3f

View File

@@ -30,6 +30,14 @@ const grades = [
} }
] ]
/**
* Returns the grade corresponding to mark.
*
* @param {number} input The marks out of 100.
* @return The corresponding grade of the marks.
* @customfunction
*/
function getGrade(mark){ function getGrade(mark){
if (typeof(mark) != 'number') if (typeof(mark) != 'number')
for (let i=0;i<=grades.length-1;i++){ for (let i=0;i<=grades.length-1;i++){