Check for repeated characters in a string Javascript

This will do:

function isIsogram (str) {
    return !/(.).*\1/.test(str);
}

Leave a Comment