(Map|Set|WeakMap)#set() returns `this` ?

Tab Atkins Jr. jackalmage at gmail.com
Wed Dec 5 09:26:23 PST 2012

On Wed, Dec 5, 2012 at 8:52 AM, Andrea Giammarchi
<andrea.giammarchi at gmail.com> wrote:
> and as last argument from my side, I **LOVE** the DOM appendChild method and
> I use it a lot
> var div = document.body.appendChild(document.createElement("div"));
> This is the best example of "returning the value" I could think and the one
> I use the most on daily basis.

On the other hand, I find it constantly frustrating, because I always
want to chain more operations (like more .appendChild() calls) off of
it, and am instead forced to do them as separate statements. ^_^


More information about the es-discuss mailing list