I'm trying to make a web app, obviously for this I would need to know how to modify variables. I'm new to JS, is there something I'm missing? The following returns NaN
var example = 30
function add() {
var example = example + 10
document.getElementById("text").innerHTML = example
}
<P id="text"></text>
<button onclick="add()">
example. p.s. there's no such thing called:</text>(typo?)