Tell us what’s happening:
I don’t know how to grab elements inside a div with an ID, I’ve researched it and can’t find a way to do it.
this is the prompt =>
The next step is to select all of the elements responsible for displaying the scores.
Use the querySelectorAll()
method to access all of the input
elements inside the #score-options
div
element and assign that result to a constant called scoreInputs
.
Then use the querySelectorAll()
method to access all of the span
elements inside the #score-options
div
element and assign that result to a constant called scoreSpans
.
the error I get is =>
You should target all of the input
elements inside the #score-options
div
element.
Your code so far
const scoreInputs = document.querySelectorAll('#score-options div > input');
const scoreSpans = document.querySelectorAll('#score-options div > span');
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Intermediate Algorithmic Thinking by Building a Dice Game - Step 2