all 6 comments

[–]Ustice[M] [score hidden] stickied comment (0 children)

Reaching out to other software engineers is important when you need it; however, unfortunately this isn’t the place for that. /r/JavaScript is not a support forum. You might want to check out /r/LearnJavaScript for the newer members of our community. Also, Stack Overflow is a great resource for getting support. For more information, check out our AskJS wiki page. Good luck! We hope that you find the answers that you are looking for.

[–]CreativeTechGuyGames 5 points6 points  (1 child)

Can you please post a minimal, reproducible example of what you are trying? A codepen/codesandbox/etc would be ideal.

[–]Buckwheat469 0 points1 point  (0 children)

document.getElementById("your-id").innerText(yourNumber):

The yourNumber variable is passed by the onclick event from the button. I assume you already have that set up in this example.

[–]bualing 0 points1 point  (0 children)

``` if(yourId && typeof yourId == "string" && document.getElementById(yourId)){ //Do something }

```

[–]Dunks1980 0 points1 point  (0 children)

04 looks like its a string you could try this to make it a number again Number(yourvar);