+ 1
Same question but different way!
HTML: <p>x</p> I want to relate it with js and the output should be 20,where x=5
2 Respostas
+ 4
You should learn vue / angular to perform these kinds of view-controller bindings!
Both of them are very simple and great libraries.
+ 2
const pNode = document.querySelector("p");
let x = 5;
pNode.innerHTML=x*4;