I keep getting failed cast undefined for the code below im not sure why
Welcome, @23binbo !
MakeCode is unhappy with this block:
If the length of the array is zero, then it contains no items. If it contains no items, then you cannot get the value at index 0—it does not exist.
2 Likes