new Set([5, 5, 1, 5, 1]) new Set('abracadabra') isogram = mot => mot.length == new Set(mot.toLowerCase()).size isogram('Dermatoglyphics') isogram('aba') isogram('moOse') function isogram(mot) { mot = mot.toLowerCase(); for (i = 0; i < mot.length - 1; i++) { for (j = i + 1; j < mot.length; j++) { if (mot[i] == mot[j]) return false; } } return true; } isogram('Dermatoglyphics') isogram('aba') isogram = mot => !/(.).*\1/i.test(mot.toLowerCase()) isogram('Dermatoglyphics')