Yes, but the loop returns all of the numbers inside the const... And in that case, it always returns the last number (because I can use only one number - in other case all of them are returned and used).
Not if you program it correctly. Simply use a break or use a subfunction and return the value.