index.js
function checkRateRange(num) {
    var numString = num.substring(0, num.length - 1);
    var parseNum = parseInt(numString);
    if (parseNum < 20) {
        throw new Error("The minimum rate is twenty percentage. Received: " + parseNum);
    }
}
function checkRateRange(num) {
    var numString = num.substring(0, num.length - 1);
    var parseNum = parseInt(numString);
    if (parseNum < 20) {
        throw new Error("The minimum rate is twenty percentage. Received: " + parseNum);
    }
}
function checkRateRange ( num ) { var numString = num . substring ( 0 , num . length - 1 ) ; var parseNum = parseInt ( numString ) ; if ( parseNum < 20 ) { throw new Error ( "The minimum rate is twenty percentage. Received: " + parseNum ) ; } }
This method ensures that the value of the rate must be equal or great than 20%
@param num is the value of rate
This method ensures that the value of the rate must be equal or great than 20%