Answer:
- Use the one that reads most clearly.
- If you can’t decide, just pick one.
- If you can’t then use for()
- If at any point later in time you change your mind, refactor your code.
This is how professionals work. Decide, and for all things with low impact to change, don’t sweat it.
Save that for architectural and API design choices.
Answer#2:
- Well if you are looking for a simple technique to choose which loop to use you can use these rules.
- Use for loops when there's a sequence of elements that you want to iterate.
- Use while loops when you want to repeat an action until a condition changes.
And if whatever you are trying to do can be done with either for or while loops then just choose your favourite :)
Answer:
I don't know what that is but what type of work you need help with
have a good day :)
Explanation: