Design comparison
SolutionDesign
Solution retrospective
How can i convert [object HTMLButtonElement] to string, I couldn't get a solution to that.
Community feedback
- @FabzusPosted over 2 years ago
Hello, @DEV-HIZRAEL
I'm thinking u did something similar to my mistake
When I used textContent I forgot to take out the "quotation marks" and ended up typing something like this:
rating.textContent = "ratingVal";
In my case, all I had to do was remove the " quotation marks" so it became:
rating.textContent = ratingVal;
Marked as helpful0 - @GrzywNPosted over 2 years ago
Hey @DEV-HIZRAEL!
To achieve that you can use
element.innerText
orelement.textContent
:)Have a nice day and keep coding!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord