BearCola
4/17/2019 - 9:39 AM

Random index 구하기

const getMood = () => {
  const moods = ["Angry", "Hungry", "Silly", "Quiet", "Paranoid"];
  return moods[Math.floor(Math.random() * moods.length)];
};