What is the difference between alert and window.alert?

javascript

Solution

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.

Problem

What is the difference between `alert()` and `window.alert()` functions? It seems to work the same.

Original source