Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  187] [ 1]  / answers: 1 / hits: 30686  / 12 Years ago, mon, november 19, 2012, 12:00:00

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


More From » javascript

 Answers
7

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.


[#81907] Saturday, November 17, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaceyr

Total Points: 510
Total Questions: 97
Total Answers: 116

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
kaceyr questions
;