code: function _updateEnteredMagicWords(wish, magicWord) {
    // Reset entered magicWords order.
    const spotForWishes = _createSpotInEnteredMagicWords(
      _enteredMagicWords,
      magicWord,
    )
    spotForWishes.wishes = spotForWishes.wishes || []
    const existingIndex = spotForWishes.wishes.indexOf(wish.id)
    if (existingIndex !== 0) {
      _repositionWishIdInEnteredMagicWordsArray(
        wish.id,
        spotForWishes.wishes,
        existingIndex,
      )
    }
  }
docs: Updates the _enteredMagicWords map. Steps:
  1. Get or create a spot for the magic word in the map.
  2. If the wish is the first element in the map already,
  do nothing. (return)
  3. If the wish already exists in the map, remove it.
  4. If the wish was not already the second element,
  set is as the second element. If it was, set it
  as the first element.
  @param {wish} wish
  @param {string} magicWord
  @private