Help with buttons HTML+JavaScript
So I'm trying to make a simple calculator a some time, and I have a problem. I can't "writte" the results. Click on add and after on history to better unterstanding. (sorry for bad grammar) HTML: <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <button onclick="add()">Add</button> <button onclick="H()">History </button> <p id="L">History gonna here </p> </body> </html> JavaScript: num1=5; num2=30; var RH = (num1 + num2) //function calcRH () { //RH = ("</br>" + RH);} function add () { var N = prompt ("Number 1"); var M = prompt ("Number 2"); var L = (Number(N) + Number(M)); } function H () { document.getElementById("L").innerHTML = (L + RH); } https://code.sololearn.com/W2uwer0hrn8G/#html