blob: 6abd385a3503c7912a9e5e70dc1ebde0e7a2c991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// 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.18-4-3
description: Array.prototype.forEach throws TypeError if callbackfn is null
includes: [runTestCase.js]
---*/
function testcase() {
var arr = new Array(10);
try {
arr.forEach(null);
}
catch(e) {
if(e instanceof TypeError)
return true;
}
}
runTestCase(testcase);
|