How would you change the background colour of a div with the id "colourme" to purple?

var div=document.getElementById("colourme"); div.style.backgroundColor = "purple"

GH

Related Javascript Mentoring answers

All answers ▸

What is the importance of javascript in the web?


I've just heard about objects. How do I use them and do they work with Arrays?


Make button that says how many times it has been clicked.


How to sum every number in an array of numbers.