var isAlienSorted = function(words, order) {
pass = true
for (cur=0; cur<words.length -1; cur++){
currentWord = words[cur]
nextWord = words[cur+1]
console.log("\n",currentWord, " ", nextWord)
for (i=0; i<currentWord.length; i++){
first = -1
second = -1
for(j=0; j<order.length; j++){
if (currentWord[i] === order[j]) first = j
if (nextWord[i] === order[j]) second = j
}
console.log(currentWord[i], " ",first, " ",nextWord[i], " ",second, " ")
if (first <second) break
if (first >second) {
pass = false
break
}
}
}
return pass
};