app.js
// One by one injects each word from quote to the dom.

One by one injects each word from quote to the dom.
One by one injects each word from quote to the dom .
function plugQuoteIntoDOM (container, text) {
  let textArr = text.split('');
  for (let i in textArr) {
    const word = document.createElement('h6');
    word.setAttribute('id', `${i}`);
    word.setAttribute('class', 'letter')
    word.innerHTML = textArr[i];
    if (textArr[i] === " ") {
      word.style.width = '5px';
    }
    container.appendChild(word)
    textArr[i] = word;
  }
  return textArr;
}
function plugQuoteIntoDOM ( container , text ) { let textArr = text . split ( '' ) ; for ( let i in textArr ) { const word = document . createElement ( 'h6' ) ; word . setAttribute ( 'id' , ` ${ i } ` ) ; word . setAttribute ( 'class' , 'letter' ) word . innerHTML = textArr [ i ] ; if ( textArr [ i ] === " " ) { word . style . width = '5px' ; } container . appendChild ( word ) textArr [ i ] = word ; } return textArr ; }
One by one injects each word from quote to the dom.
One by one injects each word from quote to the dom .