function checkRole(roleToCheck, roles) {
    for(let i = 0; i<roles.length; i++){
        if(roles[i] == roleToCheck || checkRole(roleToCheck, memoryDB.RH[roles[i]])){
            return true
        }
    }
    return false
}
/**
 * Checks if roleToCheck exists in the collection roles passed
 *
 * @param roleToCheck string role
 * @param roles array of strings role
 * @return {boolean}
 */
Checks if roleToCheck exists in the collection roles passed
@param roleToCheck string role
@param roles array of strings role
@return {boolean}
Checks if roleToCheck exists in the collection roles passed @param roleToCheck string role @param roles array of strings role @return { boolean }
function checkRole(roleToCheck, roles) {
    for(let i = 0; i<roles.length; i++){
        if(roles[i] == roleToCheck || checkRole(roleToCheck, memoryDB.RH[roles[i]])){
            return true
        }
    }
    return false
}
function checkRole ( roleToCheck , roles ) { for ( let i = 0 ; i < roles . length ; i ++ ) { if ( roles [ i ] == roleToCheck || checkRole ( roleToCheck , memoryDB . RH [ roles [ i ] ] ) ) { return true } } return false }
Checks if roleToCheck exists in the collection roles passed
 @param roleToCheck string role
 @param roles array of strings role
 @return {boolean}
Checks if roleToCheck exists in the collection roles passed @param roleToCheck string role @param roles array of strings role @return { boolean }