Typical basic operation to sort an array of numbers and traverse a tree.
Answers
Answered by
1
Answer:
sort((a,b)=>a-b) to sort an array of numbers in ascending numerical order or . sort((a,b)=>b-a) for descending order. The . sort() method sorts the array in-place, so if necessary we can make a copy while sorting by using the syntax
Hope it helps .
Explanation:
Similar questions