Answers for "haxe get last item of array"

0

haxe get last item of array

// haxe
var array:Array<T> = [object1, object2];

var lastItem = array[array.length];
Posted by: Guest on January-24-2022
0

how to find last element of an array

let arry = [2, 4, 6, 8, 10, 12, 14, 16];
let lastElement = arry[arry.length - 1];

console.log(lastElement);
Posted by: Guest on December-20-2021
0

Get the last item in an array

if (loc_array[loc_array.length - 1] === 'index.html') {
   // do something
} else {
   // something else
}
Posted by: Guest on January-24-2021

Browse Popular Code Answers by Language