Question: / 4 / / Select the fourth box with a selector of your choice. Change the text inside / / the box to the string
Select the fourth box with a selector of your choice. Change the text inside
the box to the string "Four"
document.querySelectorAllproblemfour"textContent "Four";
Select the fifth box. Remove the text and replace it with a child button that says
let fifthBox document.getElementsByIdproblemfive";
fifthBox.innerText
let fifthButton document.createElementbutton;
fifthButton.innerText
fifthBox.appendChildfifthButton
Select the span element. Remove it from the DOM.
const allSquares document.querySelectorAllsquare'
allSquares.forEachsquarei
ifi
square.remove
Select the element with the number and change the number to because you
just removed number
let numberSevenElement document.querySelectorbox:nthchild;
if numberSevenElement
numberSevenElement.textContent ;
Select the last box, and add the class of "last". This will apply new styling
to the box if successful. Change the text inside to box to "END!!!"
let lastBox document.querySelectorbox:lastchild";
if lastBox
lastBox.classList.addlast;
lastBox.textContent "END!!!";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
