const fruits = ['apple', 'banana', 'strawberry']; const spell = 'どれにしようかなてんのかみさまのいうとおり'; const spellLength = [... spell].length; const countedPoint = spellLength % fruits.length; if(countedPoint === 0) { console.log(fruits[fruits.length - 1]); } else { console.log(fruits[countedPoint - 1]); } 呪文を配列の…