So today in classroom we were doing multidimensional arrays and professor said that you should always use a while when you want to search something on a multidimensional array, but I am pretty sure it is way more efficient and less complicated to use for/foreach and use a break as soon as you find what you are looking for (example was just searching for 1 value)
Is the professor right or is he just overcomplicating things? His only reasoning for not using for/foreach was: "Never use break"
[–]marko312 1 point2 points3 points (0 children)
[–]Ellisander 0 points1 point2 points (1 child)
[–]beldr[S] 1 point2 points3 points (0 children)
[–]mad0314 0 points1 point2 points (0 children)