Guest User

Untitled

a guest
Jul 12th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. -const actions = [
  2. - writeLine("Jake Weary"),
  3. - writeLine("ScarJo"),
  4. - writeLine("Chris Hemsworth"),
  5. - writeLine("Mark Ruffalo")
  6. -]
  7. -
  8. + // Cycle these 4 names 100 times
  9. +const names = ["Jake Weary", "ScarJo", "Chris Hemsworth", "Mark Ruffalo"]
  10. +
  11. +const actions = Array
  12. + .from(Array(100).keys())
  13. + .map(i => writeLine(names[i % names.length]))
Add Comment
Please, Sign In to add comment