summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Array/prototype/some/15.4.4.17-5-23.js
blob: 418086d116603ded27cad7f83158c96a22038d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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.some
description: Array.prototype.some - number primitive can be used as thisArg
---*/

function callbackfn(val, idx, obj) {
  return this.valueOf() === 101;
}

assert([11].some(callbackfn, 101), '[11].some(callbackfn, 101) !== true');

reportCompare(0, 0);