i've been writing my own helper library for my day to day tinkering, and like to add documentation to each function i create. now the issue i am having is the following:
the way i add documentation to most of my function works and no issue lets take my (w3schools copied) rng
/**
* a function for generating an integer between a and b.
* further documentation...
* @param {!number} min - this is the lower bound
* @param {!number} max - this is the higher bound
*/
function random (min, max){
return Math.floor(Math.random() * (max - min) ) + min;
}
this works and gives me the proper instructions in my ide(?) vsc
now the issue is when i try to add it to an existing js object like number take my function to see if a number is between two other numbers
/**
* a function for checking if n is between but not equals a and b.
* @param {!number} lower - the lower number
* @param {!number} higher - the higher number
*/
Number.prototype.isBetween = function (lower, higher) {
return (this > lower && this < higher || this > higher && this < lower) ? true : false;
}
this does not even give me the suggestion that myVar.isBetween(a,b) is a function nor gives it me any documentation