yes i can declare and also initialiazee a variable.just that i did not understand what i was tasked to do.most problem i have is not understanding the question.once i do i could actually tackle it from there.google is my friend
I’m not sure what part of the instructions you don’t understand though…
Declare and initialize a variable total to 0 .
You said you know how to do this (though, you have not done this yet)
Use a for loop to add the value of each element of the myArr array to total .
You said you know how to add values, and you posted code where you were using a for loop to print all elements in your array…
So what exactly don’t you understand?
If you just want me to use different words to describe the problem so you can Google the answer and copy it - that’s just silly and won’t help you learn.