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

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Dec 5 11:08:15 PST 2012


forgot latter comparison with an unknown value

get the value
  void: var v = generate(); map.set(key, v); return v;
  this: return map.set(key, generate()).get(key);
  value: return map.set(key, generate());

br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121205/f62b946a/attachment.html>


More information about the es-discuss mailing list