Inside the code editor we've tried to write a function that takes an array nums as argument and returns true if there exists at least one positive (greater than zero) number in the array; returns false otherwise.
So when we called the function for [-1, 2, 3], we expected our program to print:
Array has positive numbers
but it seems like we made a mistake because our code doesn't even compile. The compiler reports:
Type Mismatch Error
Found: Unit
Required: Boolean
Assignment:
Your task is to fix our function.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
