concept word in category javascript

appears as: word, The words, words, word
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

This is an excerpt from Manning's book Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond.

Assume you are going to add another module at ./src/format/word and update the index file to export all of the word formatters.

In this capstone you’re going to build a hangman game. The game will incorporate a status message, letter slots for the word, and buttons for guessing letters (figure 22.1).

22.2. The words module

Start with a simple function that just returns an array of words.

const myString = Object("Iterables are quite something");
myString[Symbol.iterator] = function* () {
  for (const word of this.split(' ')) yield word;
}
const words = [ ...myString ]                              1
!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":4,\"ch\":59},{\"line\":4,\"ch\":60}]]"}
!@%STYLE%@!