“alert” is not defined when running www.jshint.com

Instead of

alert('message')

you should use

window.alert('message');

Because this method is defined in window object.

This of course assumes you have browser option set to true in your .jshintrc, so this way jshint will know window object is exposed.

"browser"       : true,     // Standard browser globals e.g. window, document.

*The same thing happens with confirm().

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)