js how to return an array code example
Example 1: how to get element of an array in javascript
var value = [a,b,c,d];
var value_b = value[1];
Example 2: js array
const users = ["Mark", "Greg"];
Example 3: return array javascript
function func() {
return [5, "string", {a: 7}];
}
Example 4: js fucntion return array
function BlockID() {
var IDs = new Array();
images['s'] = "Images/Block_01.png";
images['g'] = "Images/Block_02.png";
images['C'] = "Images/Block_03.png";
images['d'] = "Images/Block_04.png";
return IDs;
}