returning the position of an item in an array, instance is i have 10 items in an array and i want to the item in the 9th position till the 7th position
Aug 9, 2021, 4:53 PM
string[] newArray;
for(uint i=array.length-2;i>6;i++){
newArray.push(array[i]);
}
return newArray;
for(uint i=array.length-2;i>6;i++){
newArray.push(array[i]);
}
return newArray;
Aug 9, 2021, 4:59 PM
Alright thanks.
Aug 9, 2021, 5:00 PM
May not compile direct, but that's the logic
Aug 9, 2021, 5:00 PM
yea got you, will check to see and figure it out, just need a scope, also will let you know how it goes, thanks man.
Aug 9, 2021, 5:01 PM