Created
July 7, 2018 16:09
-
-
Save uzorjchibuzor/0e23790d210a7c9c67346dc1d545fc9e to your computer and use it in GitHub Desktop.
Function to determine whether a word is an isogram or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isIsogram(check){ | |
| if (check) { | |
| for (let i = 0; i < check.length; i++) { | |
| for (let j = i + 1; j < check.length; j++) { | |
| if (check[i] === check[j]) return false; | |
| } | |
| } | |
| return true; | |
| } | |
| return 'Invalid Entry!' | |
| } | |
| isIsogram('abcdefghijklmnopqrstuvwxyz'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.