Q:

Skipping an argument using the javascript .bind() method

In JavaScript I can bind arguments to a function like so..
function foo(arg1, arg2) { console.log(arguments); }
foo = foo.bind(this, 'bar');

When called, we get this output...
foo('baz');
> { '0': 'bar', '1': 'baz' }

Is it possible to skip arguments in the .bind() function to achieve the following output?
function foo(arg1, arg2, arg3, arg4) { console.log(arguments); }
foo = foo.bind(this, 'bar', null, 'qux');
foo('baz', 'lel');
> { '0': 'bar', '1': 'baz', '2': 'lel', '3': 'qux' }

A:

Take a look at Underscore's _.partial:

Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. You may pass _ in your list of arguments to specify an argument that should not be pre-filled, but left open to supply at call-time.

In your case:
function foo(arg1, arg2, arg3, arg4) { console.log(arguments); }
foo = _.partial(foo, 'bar', _, 'qux');
foo('baz', 'lel');
> { '0': 'bar', '1': 'baz', '3': 'qux', '4': 'lel'}

Yes, I know this is not exactly what you said you wanted. You seem to want both arguments to be squeezed in where the _ is. There is no good way around that other than explicitly specifying that two arguments will be filled in at the time of call:
foo = _.partial(foo, 'bar', _, _, 'qux');

I am not necessarily recommending that you use this, but at least you could take a look at their code and get some hints.
If you want to have predetermined arguments always come at the end, like 'qux', you will need some additional machinery. For instance, here's a little routine (using ES6, but you can adapt), that transforms a function into one where specified parameters are placed at the end of the argument list:
function partialEnd(fn, ...predefinedArgs) {
  return function() {
    return fn.apply(this, [...arguments, ...predefinedArgs]);
  };
}

You can use this like this:
function foo(a, b, c) { console.log(a + b + c); }
foo = partialEnd(foo, 3);
foo(1, 2) // outputs 6

You could combine this with _.partial using _ placeholders to obtain an effect where some parameters are inserted into the argument list, and others are always placed at the end:
function foo(arg1, arg2, arg3, arg4) { console.log(arguments); }
foo = _.partial(foo, 'bar', _, _);
foo = partialEnd(foo, 'lel');

foo('baz', 'lel');
> { '0': 'bar', '1': 'baz', '3': 'lel', '4': 'qux'}

