Here and throughout, the variable "console" will shadow window.console on browsers that support it. Could you please try to avoid that by choosing another consistent name?