daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. phraseArray = ["hello", "hi", "bye", "goodbye"];
  2.  
  3. addPhrase = function() {
  4.   debugger;
  5.   var getBox = document.getElementById('paragraphBox');
  6.   var makeParagraph = document.createElement('p');
  7.   getBox.innerHTML = "";
  8.     for (var i = 0; i < phraseArray.length; i++ ) {
  9.     getBox.appendChild(makeParagraph);
  10.     makeParagraph.innerHTML = phraseArray[i];
  11.     }
  12. }
RAW Paste Data
Top