Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (17 sloc) 383 Bytes

Title: Passing arguments to another function in JavaScript

Date: 1428527874

Authors: rasshofer


If you want to pass arguments to another function in JavaScript, you can use .apply() to have the same access to arguments.

function a() {
    b.apply(this, arguments);

function b() {

a('Lorem', 'ipsum');
You can’t perform that action at this time.