blob: 16f307c0fcfdb0a806763d4f85d4068f2e01ff85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.map
es5id: 15.4.4.19-2-18
description: >
Array.prototype.map - applied to String object, which implements
its own property get method
---*/
function callbackfn(val, idx, obj) {
return parseInt(val, 10) > 1;
}
var str = new String("432");
String.prototype[3] = "1";
var testResult = Array.prototype.map.call(str, callbackfn);
assert.sameValue(testResult.length, 3, 'testResult.length');
|