function countWords(){
var sentence = document.getElementById("sentence-input").value;
var text = sentence.split(" ");
var lengthofString = text.length;
document.getElementsByClassName("word-count").innerText = lengthofString;
console.log(text);
console.log("length of string " + lengthofString);
}
Here is my current code, I'm able to get the length of the current string but i dont know how to simply display that number in my paragraph element.