Calling Map/Set/WeakMap without new now raises warning

Published: | Categories: JavaScript


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.