JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

<script src="http://files.the-friend-family.com/log.js"></script>

JavaScript

function filterArray(sourceArray, arg1, arg2 /* ... more args */) {
    // get arguments after the first argument into their own array
    var args = Array.prototype.slice.call(arguments, 1);
    return sourceArray.filter(function(element, index, array) {
        return args.indexOf(element) === -1;
    });
}

log(filterArray([1, 2, 3, 1, 2, 3], 2, 3));