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

Published: | Categories: JavaScript


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.