I am trying to create a while loop which loops over the elements in the array sumCheck and stops looping when it reaches an element that is greater than 9. I also want to count how many times the loop loops, so I've used count.
count = 0
while sumCheck <= 9 && count<=length(sumCheck)
count = count + 1
So far I've written this, but I feel like I'm missing something. I'm not sure how to call for all the elements in sumCheck to be less than 9.