Because window is the global object, you can call an alert either by it’s shorthand: alert( 'Hello!' ); or by referencing the global object specifically: window.alert( 'Hello!' );
They are the same.
Because window is the global object, you can call an alert either by it’s shorthand: alert( 'Hello!' ); or by referencing the global object specifically: window.alert( 'Hello!' );
They are the same.