Answers for "javascript return list"

VBA
12

javascript return multiple values from a function

//function that returns multiple values
function getTopTwoColors() {
    return ["blue", "pink"];
}
var topTwoColors=getTopTwoColors();
var firstValue=topTwoColors[0]; //get first return value
var secondValue=topTwoColors[1]; //get second return value
Posted by: Guest on July-31-2019
3

return array javascript

function func() {
  return [5, "string", {a: 7}];
}
Posted by: Guest on May-20-2020
2

get item in array from index

var valueAtIndex1 = myValues[1];
Posted by: Guest on March-24-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language