Lately, I've been delving into the realm of JavaScript WeakMaps. To my surprise, upon browsing through the documentation, I stumbled upon the fact that the clear
method has officially been phased out with ECMAScript 6.
This raises the question: why have developers at ECMAScript chosen to eliminate this feature? What's the rationale behind mandating a custom clear function such as:
clear() {
this._weakmap = new WeakMap()
}