array/some.js

From disqus.com, 9 Months ago, written in JavaScript, viewed 3 times. This paste is a reply to indexOf.js from disqus.com - go back
URL https://pastebin.freepbx.org/view/d430bd33/diff Embed
Viewing differences between indexOf.js and array/some.js
define('core/utils/array/indexOf',[],function define('core/utils/array/some',[],function () {
    'use strict';

    return function indexOf(arr, val) some(arr, callback, that) {
        for (var i = 0; i < arr.length; ++i) {
            if (arr[i] === val)
                
(callback.call(that, arr[i], i, arr))
                
return i;
true;
        }

        return -1;
false;
    };
});

// https://c.disquscdn.com/next/next-core/core/utils/array/indexOf.com/next/next-core/core/utils/array/some.js
// https://a.disquscdn.com/next/next-core/core/utils/array/indexOf.com/next/next-core/core/utils/array/some.js

Replies to array/some.js rss

Title Name Language When
each.js disqus.com javascript 9 Months ago.

Reply to "array/some.js"

Here you can reply to the paste above