const firstWords = ["dying", "journey", "bones", "living", "killing", "ending", "reaping", "taste", "style", "growth", "edification", "grasping", "mysteries", "discovering", "searching", "wonder", "teaching", "working", "skipping", "existence", "flying", "wandering", "feeling"];

const secondWords = ["in the", "between the", "over the", "after the", "amid the", "inside the", "along the", "across the", "within the", "aboard the", "in spite of the", "under the", "through the", "because of the", "by the", "born of", "made by the"];

const thirdWords = ["mountains", "open sea", "grief", "rocky sea", "decades", "love letter", "hate", "crowd", "resentment", "cloudy skies", "overflow", "disaster", "aftermath", "unknown", "desert", "spotlight", "last gasp", "past", "theater", "hallway", "future", "harsh winter", "dark forest", "city"];

const getRandomNumber = (max) => Math.floor(Math.random() * max);

const getRandomName = () => 
  `${firstWords[getRandomNumber(firstWords.length)]}\n ${secondWords[getRandomNumber(secondWords.length)]}\n ${thirdWords[getRandomNumber(thirdWords.length)]}`;

const setRandomName = () => {
  document.getElementById('random-name').innerText = getRandomName();
}

document.getElementById('generate')
  .addEventListener('click', setRandomName);

setRandomName();

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

Post what you make on IG and tag this project! #brainstormsurge

Made by Claire Gipson @clairegipsoncreates 

Netflix Title Generator