+ 1

Can someone please help me with this Javascript calculator?

So I already created this calculator using document.write() but since it's bad practice I wanted to create one by making a paragraph and using innerHTML() to insert the calculations into the paragraph. Can someone please help me with this? Here is my code: https://code.sololearn.com/WjqXp2xoGAIS

8th Jun 2022, 2:36 PM
Ava Alford
1 Answer
+ 1
document.getElementById('p').innerHTML= mystr; Add js code between window.onload = () =>{ //js here } better add functions out side this.
8th Jun 2022, 3:14 PM
Jayakrishna 🇼🇳