diff --git a/script.js b/script.js index 6582e0d..5d28a4c 100644 --- a/script.js +++ b/script.js @@ -1,11 +1,24 @@ console.log("hello script js"); var inputHappened = function(currentInput){ + if(currentInput === "clear"){ + var output = document.querySelector('#output'); + output.innerHTML = ""; + } console.log( currentInput ); - display( "WOW SOMETHING HAPPENED" ); + display( currentInput); }; + var display = function(stuffToDisplay){ // your DOM manipulation code here - + + var list = document.getElementById("output") + var myNewList = document.createElement('p'); + + var i = parseInt(stuffToDisplay); + + myNewList.textContent = "🍍".repeat(i); + list.appendChild(myNewList); + };