mirror of
https://github.com/nodejs/node.git
synced 2025-05-19 08:24:38 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
10 lines
211 B
JavaScript
10 lines
211 B
JavaScript
'use strict';
|
|
|
|
var fn = function (x) { return x > 3; };
|
|
|
|
module.exports = function () {
|
|
var arr = [1, 2, 3, 4, 5, 6];
|
|
if (typeof arr.findIndex !== 'function') return false;
|
|
return arr.findIndex(fn) === 3;
|
|
};
|