I just want to know where i went wrong, i tried every stack overflow answers but couldn't find one that answered my code problem
var x = document.getElementById("blah").value;
var y = document.getElementById("meow").value;
var z = x + y;
function calculate() {
document.getElementById("frick").innerHTML = z;
}
button {
width: 20%;
}
<input id="blah">
<input id="meow">
<button onclick="calculate()"></button>
<p id="frick"></p>