+ 2
what is the difference between window.alert and alert??
5 Answers
+ 1
can you please explain how it is working?
+ 1
They are strictly the same. Prefixing alert() with window is optional.
+ 1
is same, just in browser Object's top _proto_ is 'window'
0
they are the same
0
alert() is a method
window.alert() here window is a object
But both are work same