+ 9
The reason of the error is a bug on SoloLearn playground in android. They decided to run js first for some reason.. that's why the js looks for HTML elements which doesn't exists yet, and that's why error happens. So make the JS wait for elements to load, use this: ``onload = () => {} `` just like Bob_Li said for that.
13th Dec 2024, 5:02 PM
Shihan
Shihan - avatar
+ 3
Zvi Android app users gets error messages without the onload hack.
13th Dec 2024, 2:20 PM
Bob_Li
Bob_Li - avatar
+ 2
in your js, put display variable assignment inside onload function. onload = () => { let display = document.getElementById('display'); }
13th Dec 2024, 1:07 PM
Bob_Li
Bob_Li - avatar
0
Works perfectly for me. Gorgeous calculator, by the way.
13th Dec 2024, 2:10 PM
Zvi
Zvi - avatar
0
Thé Tim Burton
14th Dec 2024, 4:50 PM
Ebi Patrick
0
Hello bro.
14th Dec 2024, 11:03 PM
Makan Magassa
0
hello
15th Dec 2024, 3:22 AM
Karan Raj
Karan Raj - avatar
0
If you're using the playground, the error message usually gives a clue about what's wrong. It might say something https://www.ssmsmart-square.com like "Unexpected token," which means something is out of place.
17th Dec 2024, 9:09 AM
domenic85martha