Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 11 lesson 1 JS

Could someone please share the code? Thanks!
by

1 Answer

sam5epi0l
Hey, try this code:
<!doctype html>
<html>
<head>
<style>
#box {
height: 100px;
width: 100px;
border-radius: 10px;
background-color: #4535AA;
}
… // access div element with id box
let box = document.getElementById("box");
// change background color
box.style.backgroundColor = "#FFB643";
// show alert
alert("Color changed");
}
</script>
</body>
</html>

Login / Signup to Answer the Question.