I’m completing the image gallery assessment for JavaScript and I’m mostly finished with it. I would like feedback on what I’ve done so far but I’ve run into a little issue at the end. I’m trying to complete the function to make the main displayed picture (the .displayed-img
class) appear darker, but the last line of the function inside the event listener (overlay.style.backgroundColor = xxx
) doesn’t seem to be working, even though I entered it in the exact same way the assessment says. The text content of the button changes but the image doesn’t turn darker. Does anybody have an answer to this?
Link to my code: Image gallery assessment (codepen.io)