✅ Doing school HW and am unsure how to fix my issue. Trying to loop through an array with subroutine
5 Replies
you're not passing the cards as a parameter to
loopA
you'd need to do loopA(cards)
to pass itthank you so much not sure how I overlooked that.
have a good day
its cool!! you too
Note that if you want, you can also move that array outside of the method. This way you don't have to pass it as an argument (make sure to remove the parameter from
loopA
). You do need to also make the array static
like the methods.
I guess this is not what you're supposed to do in the assignment, but a little tip nonetheless