Calling Map/Set/WeakMap without new now raises warning

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

Description

Firefox will soon throw a TypeError exception when the Map, Set, or WeakMap constructor is called without the new operator, as per the ECMAScript 6 spec. Starting with Firefox 38, the Web Console shows a warning for such use cases.

References