var word = '제로초'
while(true) {
var newWord = prompt(word);//사용자로부터 입력받는다.
if(word[word.length - 1] === newWord[0]){
alert('딩동댕');
word = newWrod;
} else {
alert('땡')
}
}
for (var word = '제로초' ; true; ) {
var answer = prompt(word)
if(word[word.length - 1] === newWord[0]){
alert('딩동댕');
word = newWrod;
} else {
alert('땡')
}
}