Answers for "return two arrays javascript"

5

return multiple values in javascript

function getNames() {
    // get names from the database or API
    let firstName = 'John',
        lastName = 'Doe';

    // return values
    return {
        firstName,
        lastName
    };
}
Posted by: Guest on August-10-2020
0

return two arrays javascript

this.runThisFunctionOnCall = function(){
    var array1 = [11,12,13,14,15];
    var array2 = [21,22,23,24,25];
    var array3 = [31,32,33,34,35];

    return [
     array1,
     array2,
     array3
    ];
}
Posted by: Guest on September-05-2020

Code answers related to "return two arrays javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language