methods that return a new array code example
Example 1: how do you make a method that returns an array java
public static int[] numbers()
{
int[] arr={5,6,7,8,9}; //initializing array
return arr;
}
Example 2: 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;
}