2
Following good practice, leaving code readable to other devs, which I should adopt when I call object methods window
? Omit or not?
Some examples (simple and isolated):
const buttonStyles = getComputedStyle(button);
//const buttonStyles = window.getComputedStyle(button);
alert(erroMessage);
//window.alert(erroMessage);
onload(funtion(){});
//window.onload(funtion(){});
I believed that this omission or not of the window object was related to good bráticas, but it does not have. Thanks for the answer, Maniero.
– Felipe Oliveira
@Felipeoliveira has almost nothing to do with good practices. Look here at the site what I talk about the subject.
– Maniero
Sure! I’ll read it. Thanks again.
– Felipe Oliveira