Complete the function, inAscendingOrder
, which will take in an array and returns true
if the numbers in the array are in ascending order (that is, from the smallest to the largest).
Input: [1,3,7,8,10]
Result: true
Input:[1,-1,2,-3]
Result: false