You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to return a array from a javascript function

Summary:

Hi guys! I writed a code to return a array from a javascritp code (see an exemple below). However when I map the resoult in my payload, I get the array as an concatenated string. I tried to use the [1] to get the second value, but got the same resolt (the concatenated array as string). How can I return a array in my javascritp function

Function:

--------------------------------------------------------------

function checkTipoGanho ( Part1,Part2) {

var array = [];

array.push(Part1);

array.push(Part2);

return array;

}

---------------------------------------------------------------------------

Content (required):


Version (include the version you are using, if applicable):


Code


function checkTipoGanho ( Part1,Part2) {

var array = [];

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!