lethalskillzz / Andela-Proctor-Labs

Tests and Solutions to Andela Home Study Curriculum Proctor Labs
16 stars 23 forks source link

Labs issue #4

Open dollarpo7 opened 7 years ago

dollarpo7 commented 7 years ago

function isIsogram(word){

var mySet = new Set(word); var nWord = [];

for(i=0; i < word.length; i++){ nWord.push(word[i]); } if (nWord.length !== mySet.size){ console.log(true) } else console.log(false) }

isIsogram("benin");

I GET THE ERROR BELOW, KINDLY HELP OUT for(i=0; i < word.length; i++){ ^ TypeError: Cannot read property 'length' of undefined