Largest number in the Array
GIven an array of numbers, return the largest number.
Sample Code:
function topNum(arr) {
// Enter your logic here...
}
Examples:
Input: [1,3,4,5,3,9]
Output: 9
Explanation: 9 is the largest value among all the elements.
Input: [-1,-2,0,-3,-4]
Output: 0
Explanation: 0 is the largest value among all the elements.