@tesla-ambassador
Posted
Hey Rebeitte! Congratulations on completing this challenge! It looks really sharp and I hope you had fun completing it. π Here's a few pointers:
- To answer your question, you might want to add an
id
tag to the<span>
that contains the number 4 in your html. Then you can select that span in your javaScript usingdocument.querySelector( '#element' )
or whatever selector you are comfortable with. So you need to save the value of the button selected by the user in a variable and set that variable as theinnerText
property of the<span>
in your javaScript. To know a little more on innerText, follow this link
Happy coding and keep up the good work π
Marked as helpful
@Rebeitte
Posted
@tesla-ambassador Thank you so much! I was reading about how to use innerText and I found the solution.
Thanks for helping me improve my code and my skills!