Regressed console will be overridden by a global variable with the same name

Published: | Categories: JavaScript | Creative Commons BY-SA 3.0

Description

Due to the new implementation of the console object, it will be overridden by a user-defined global variable named console if exists, leading to unexpected behaviour. At least 2 sites are known to be broken where var console is defined at the top level code and console.log is subsequently called. Firefox 31 and above are not affected by this issue thanks to another implementation change.

References