function renderEmptyPlaceholders() {

        if (!answer) {
          answerPlaceholdersSelector.innerHTML += '<strong>Oops! Something went wrong with retrieving the answer&hellip;</strong>';
          return;
        }

        var html = '<ul id="hangman-placeholders"><li class="word-placeholder"><ul>';

        for (var $i = 0; $i < placeholderChars.length; $i++) {
          if (' ' === placeholderChars[$i]) {
            html += '<li class="character-placeholder space"></ul></li><li class="word-placeholder"><ul>';
          }
          else if (!isValidChar(placeholderChars[$i])) {
            html += '<li class="character-placeholder given">' +
                    placeholderChars[$i] + '</li>';
          }
          else {
            html += '<li class="character-placeholder guess">_</li>';
          }
        }

        html += '</ul></li></ul>';

        answerPlaceholdersSelector.innerHTML += html;
      }
/**
       * Render the HTML to show empty placeholders for each of the characters
       * that comprise the answer. Really this could be done with PHP, but hey,
       * why not do it with JS. We will interact with these placeholders quite
       * a bit, so let's give each one an id as well as a class.
       */
Render the HTML to show empty placeholders for each of the characters
that comprise the answer. Really this could be done with PHP, but hey,
why not do it with JS. We will interact with these placeholders quite
a bit, so let's give each one an id as well as a class.
Render the HTML to show empty placeholders for each of the characters that comprise the answer . Really this could be done with PHP but hey why not do it with JS . We will interact with these placeholders quite a bit so let ' s give each one an id as well as a class .
function renderEmptyPlaceholders() {
        if (!answer) {
          answerPlaceholdersSelector.innerHTML += '<strong>Oops! Something went wrong with retrieving the answer&hellip;</strong>';
          return;
        }
        var html = '<ul id="hangman-placeholders"><li class="word-placeholder"><ul>';
        for (var $i = 0; $i < placeholderChars.length; $i++) {
          if (' ' === placeholderChars[$i]) {
            html += '<li class="character-placeholder space"></ul></li><li class="word-placeholder"><ul>';
          }
          else if (!isValidChar(placeholderChars[$i])) {
            html += '<li class="character-placeholder given">' +
                    placeholderChars[$i] + '</li>';
          }
          else {
            html += '<li class="character-placeholder guess">_</li>';
          }
        }
        html += '</ul></li></ul>';
        answerPlaceholdersSelector.innerHTML += html;
      }
function renderEmptyPlaceholders ( ) { if ( ! answer ) { answerPlaceholdersSelector . innerHTML += '<strong>Oops! Something went wrong with retrieving the answer&hellip;</strong>' ; return ; } var html = '<ul id="hangman-placeholders"><li class="word-placeholder"><ul>' ; for ( var $i = 0 ; $i < placeholderChars . length ; $i ++ ) { if ( ' ' === placeholderChars [ $i ] ) { html += '<li class="character-placeholder space"></ul></li><li class="word-placeholder"><ul>' ; } else if ( ! isValidChar ( placeholderChars [ $i ] ) ) { html += '<li class="character-placeholder given">' + placeholderChars [ $i ] + '</li>' ; } else { html += '<li class="character-placeholder guess">_</li>' ; } } html += '</ul></li></ul>' ; answerPlaceholdersSelector . innerHTML += html ; }
Render the HTML to show empty placeholders for each of the characters
 that comprise the answer.
Render the HTML to show empty placeholders for each of the characters that comprise the answer .