Im fairly new to JavaScript and I'm having difficulty in understanding this syntax.
document.querySelector('dice').style.display='none';
My understanding is we are calling the querySelector method on the document object - this returns a selection. Now we call the style method on this selection - this returns a style object. Next we change its display property to 'none' to hide it.
If this is correct, shouldn't it be .style().display = 'none'?
If indeed style is a method, shouldn't brackets be required when invoking it?
?from.style().display = 'none'?.styleis an object, not a function.