I'm working on something where I would need to return an element's style and print it in the HTML page itself. Okay I know how to print it but the problem is how do I get the element. To test if it would print the style I tried
console.log(document.getElementById('something').style.fontSize);
but it returns undefined, even though 'something' does have a set font size.