Question: / / 1 / / Select the div with the id of problem - one and change the border color to / / red and
Select the div with the id of "problemone" and change the border color to
red and the border width to pixels
document.getElementByIdproblemone"style.border px solid red";
document.querySelectorAllproblemone"forEachelement
element.style.boxShadow px black";
Select the text in the first div that has the class of "even" and change the
font color to green and the font style to bold
document.querySelectoreven"style.color "green";
document.querySelectoreven"style.fontWeight "bold"
Select all of the elements with the class of "odd" and add a box shadow. You
may choose your own boxshadow values.
document.querySelectorAllodd"forEachelement
element.style.boxShadow px px px gray";
Select the fourth box with a selector of your choice. Change the text inside
the box to the string "Four"
document.querySelectorAllbox"textContent "Four";
Select the fifth box. Remove the text and replace it with a child button that says
let fifthBox document.querySelectorAllbox";
fifthBox.textContent ; Remove existing text
let button document.createElementbutton;
button.textContent ;
fifthBox.appendChildbutton
Select the span element. Remove it from the DOM.
let spanElement document.querySelectorspan;
if spanElement
spanElement.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
