JavaScript JavaScript and the DOM Making Changes to the DOM Styling Elements

dianav
PRO
dianav
Pro Student 5,208 Points

What does this phrase mean exactly?

This phrase is confusing me: "Since our function here is managing the inline display property, we can rely on the value it returns."

I thought display is "block" because of the list in this case.

1 Answer

Jamie Reardon
Jamie Reardon
Front End Web Development Techdegree Student 12,518 Points

The function (event handler in this case) for the event listener is handling the display property value based on user interaction (clicking). It has an if condition nested inside the function that toggles the styling of the element.