You are given an array of numbers arr as an argument. You need to implement the function findSmallest which will return the smallest number in the array.
Hint 1: Iterate through all the elements using a loop. Keep track of the smallest number.
Hint 2: Compare the current element in the loop to the smallest found so far and update the smallest if required.
Hint 3: Length of the array will be always greater than or equal to 1.
Sample Input 1
4, 2, 3, 1, 5
Sample Output 1
1
Explanation
1 is the smallest number amongst 4, 2, 3, 1, 5. Thus the returned number is 1.