Using the code below I'm trying to concat two objects, but I am getting an error: Uncaught TypeError: undefined is not a function
Here is my code:
function getInvitees(pid, o, u)
{
    var invitees = {};
    var inviteCount = 0;
do {
    var inviteeURL = "https://www.****.com/a/invitees/?pid={0}&offset={1}&user={2}".format(pid, o, u);
    sendRequest(friendsURL, function() { 
        var resp = JSON.parse(e.responseText);
        tmp_invitees = resp['invitees'];
        invitees = invitees.concat(tmp_invitees);
        inviteeCount = tmp_invitees.length;
    });
} while(inviteeCount != 0);
return invitees;
}
Why am I unable to contact invitees with tmp_invitees? I'm able to access invitees it just appears invitees doesn't have a concat() method.
