I'm testing some code in the latest version of Firefox, and it seems I'm
not able to define default values to function arguments which are
destructured. For example:
function test([a, b] = [1, 2]){
return a+b;
}
test([3, 4])//expect 7
test([3])//expect NaN
test()//expect 3
That should work and it works both in Traceur and Continuum.
On Thu, Jun 27, 2013 at 6:19 AM, Marius Gundersen gunder...@gmail.com wrote:
I'm testing some code in the latest version of Firefox, and it seems I'm not
able to define default values to function arguments which are destructured.
For
On Wed, Jun 26, 2013 at 7:54 PM, Dean Landolt d...@deanlandolt.com wrote:
On Wed, Jun 26, 2013 at 6:10 PM, Jason Orendorff jason.orendo...@gmail.com
wrote:
What if iterator is present but not a function? Do you walk
the prototype chain anyway? Blow up? Punt and lookup an iterator
directly
On Jun 27, 2013, at 3:19 AM, Marius Gundersen wrote:
I'm testing some code in the latest version of Firefox, and it seems I'm not
able to define default values to function arguments which are destructured.
For example:
function test([a, b] = [1, 2]){
return a+b;
}
test([3,
On Thu, Jun 27, 2013 at 11:56 AM, Jason Orendorff jason.orendo...@gmail.com
wrote:
On Wed, Jun 26, 2013 at 7:54 PM, Dean Landolt d...@deanlandolt.com
wrote:
On Wed, Jun 26, 2013 at 6:10 PM, Jason Orendorff
jason.orendo...@gmail.com
wrote:
What if iterator is present but not a
On 6/27/2013 3:19 AM, Marius Gundersen wrote:
Or maybe it just isn't implemented in Firefox?
This is correct. https://bugzilla.mozilla.org/show_bug.cgi?id=884372
___
es-discuss mailing list
es-discuss@mozilla.org
Has it been discussed yet to add an .update() method to Map and Set, a
la Python, which take an iterable (yielding [key, value] for Map, and
just value for Set) and add the iterable's entries to the Map/Set?
It desugars easily:
Map.prototype.update = function(iter) {
On Jun 27, 2013, at 4:47 PM, Tab Atkins Jr. wrote:
Has it been discussed yet to add an .update() method to Map and Set, a
la Python, which take an iterable (yielding [key, value] for Map, and
just value for Set) and add the iterable's entries to the Map/Set?
It desugars easily:
On Thu, Jun 27, 2013 at 5:06 PM, Allen Wirfs-Brock
al...@wirfs-brock.com wrote:
On Jun 27, 2013, at 4:47 PM, Tab Atkins Jr. wrote:
Has it been discussed yet to add an .update() method to Map and Set, a
la Python, which take an iterable (yielding [key, value] for Map, and
just value for Set)
On Thu, Jun 27, 2013 at 8:11 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Thu, Jun 27, 2013 at 5:06 PM, Allen Wirfs-Brock
al...@wirfs-brock.com wrote:
On Jun 27, 2013, at 4:47 PM, Tab Atkins Jr. wrote:
Has it been discussed yet to add an .update() method to Map and Set, a
la Python,
On Thu, Jun 27, 2013 at 5:26 PM, Rick Waldron waldron.r...@gmail.com wrote:
On Thu, Jun 27, 2013 at 8:11 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
In particular, I like that it just returns the modified map/set, so
it's easy to chain with, or to immediately return.
I was wondering about
On Thu, Jun 27, 2013 at 8:30 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Thu, Jun 27, 2013 at 5:26 PM, Rick Waldron waldron.r...@gmail.com
wrote:
On Thu, Jun 27, 2013 at 8:11 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
In particular, I like that it just returns the modified
I’ve found it satisfyingly idiomatic to call this `addEach` (for both maps
and other collections) in my work on Collections[1].
[1]: https://github.com/montagejs/collections
___
es-discuss mailing list
es-discuss@mozilla.org
On Thu, Jun 27, 2013 at 8:37 PM, Rick Waldron waldron.r...@gmail.comwrote:
On Thu, Jun 27, 2013 at 8:30 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Thu, Jun 27, 2013 at 5:26 PM, Rick Waldron waldron.r...@gmail.com
wrote:
On Thu, Jun 27, 2013 at 8:11 PM, Tab Atkins Jr.
14 matches
Mail list logo