get a random string which is not in the string

@param {string} string the parameter string
@return {string} the random string
function getRandomStringNotIn(string) {
    const randomString = Math.random().toString(36).substr(2);
    if (string.indexOf(randomString) === -1) {
        return randomString;
    }
    return getRandomStringNotIn(string);
}