How can i append element to end of an array directly other than using following code.
string[] array = ["1","2"];
array[lengthof-1] = "3";
How can i append element to end of an array directly other than using following code.
string[] array = ["1","2"];
array[lengthof-1] = "3";
Here is the only possible way at the moment.
int[] a = [1,2,3,4,5,6];
a[lengthof a] = 7;
There is no built-in append function at the moment.
You can simply create a function for that.
function append(int[] arr,int val){
arr[arr.length()] = val;
}
Then you can use it in your code