let game = '끝말잇기 시작'
while (true) {
let text = prompt(game);
if (game[game.length - 1] === text[0]) {
game = text;
} else {
alert('틀렸어요!!!');
}
}
var i = 0;
var a = []
while (i < 10) {
var p = prompt('');
console.log(p);
if (p === null) {
break;
}
a.push(p);
i++;
}