Skip to content

Instantly share code, notes, and snippets.

@jarellano01
Last active November 10, 2016 06:54
Show Gist options
  • Select an option

  • Save jarellano01/f53ac6e2ffd894caf5098bb68a05119d to your computer and use it in GitHub Desktop.

Select an option

Save jarellano01/f53ac6e2ffd894caf5098bb68a05119d to your computer and use it in GitHub Desktop.
Isogram created by jarellano01 - https://repl.it/ETwe/1
function isIsogram(str){
var strLower = str.toLowerCase()
var strArray = strLower.split("");
var duplicateCheck = [];
for(var i = 0; i < strArray.length; i++){
if (duplicateCheck.indexOf(strArray[i]) == -1){
duplicateCheck.push(strArray[i]);
}
else return false
if(strArray[i] == strArray[i+1]){
return false
}
}
return true;
}
@jarellano01

Copy link
Copy Markdown
Author

An isogram is a word that has no repeating letters, consecutive or non-consecutive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment