console might not be defined (old ie versions)

use `window.console` instead of `console`