Today I was working with an exercise from a JS course. One of the tasks was to change the font-size of the <p> element by clicking the "+" and/or "-" button. An additional challenge was to stop increasing/decreasing the size when the font-size property gets a certain value.
I encountered three issues while trying to solve this problem:
but in this case, console returned a null value.
windowand returns an object containing the values of all CSS properties of an element. It is therefore necessary to create another variable that retrieves the font size value from this object.