If I am adding an event listener to an element that as a font size that isn't directly defined, what's the best way to increment that on click?
For example event.target.style.fontSize
is equal to "" when trying to read it and increment it.
cont.addEventListener('click', () => {
let size = parseInt(event.target.style.fontSize.split("px")[0]) + 5;
event.target.style.fontSize = fontSize.toString() + "px"
});