Write a function threeSmallest(numbers) that returns the three smallest numbers of an array.
numbers is an array of integers. They can be positive, negative or 0.[3, 3, 1] gives [1, 3, 3].[].10 is larger than 9.If you sort, keep in mind that sort changes (mutates) the array it is called on and needs a compare function to sort numbers by value.
threeSmallest([5, 1, 4, 2, 3])Returns [ 1, 2, 3 ]
threeSmallest([3, 3, 1])Returns [ 1, 3, 3 ]
threeSmallest([8, 2])Returns [ 2, 8 ]
threeSmallest([ 5, 1, 4, 2, 3 ])[ 1, 2, 3 ]threeSmallest([ 3, 3, 1 ])[ 1, 3, 3 ]threeSmallest([ 8, 2 ])[ 2, 8 ]Hidden tests run on Submit.