blob: 5b50b0226514d5de2f0b843773be13969ec2b2a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.4.4.21-9-b-1
description: >
Array.prototype.reduce returns initialvalue when Array is empty
and initialValue is present
includes: [runTestCase.js]
---*/
function testcase() {
function callbackfn(prevVal, curVal, idx, obj)
{
}
var arr = new Array(10);
if(arr.reduce(callbackfn,5) === 5)
return true;
}
runTestCase(testcase);
|