JavaScript30秒, 从入门到放弃之Array(四)

Returns the n maximum elements from the provided array. If n is greater than or equal to the provided array's length, then return the original array(sorted in descending order). Use Array.sort() combined with the spread operator ( ... ) to create a shallow clone of th...