Details
Assignee
Michael OffnerMichael OffnerReporter
Adam CameronAdam CameronPriority
MajorNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Adam Cameron
Adam CameronPriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Created 2 May 2017 at 08:43
Updated 14 July 2021 at 14:35
See http://blog.adamcameron.me/2017/04/cfml-lucee-13-v-4-14-v-6-coldfusion-we.html
See this test case:
describe("reduce tests", function(){ var numbers = duplicate(baseNumbers); it ("accepts a default for the first argument", function(){ var ids = numbers.reduce(function(sum=[], row){ return sum.append(row.id); }); expect(ids).toBe([1,2,3,4]); }); it ("accepts an initial value", function(){ var ids = numbers.reduce(function(sum, row){ return sum.append(row.id); }, []); expect(ids).toBe([1,2,3,4]); }); });
The first test fails on Lucee because it does not respect the default value for that
sum
argument.