0
array.sort ()
How does the array.sort () achieve “SORT-NUMBER”? And what is the result?
2 ответов
+ 7
Hello, 😊
If you need help, you can post the code you're struggling with!
• SEARCH for similar QUESTIONS or ANSWERS before posting
• Include relevant TAGS
• https://www.sololearn.com/post/75089/?ref=app
+ 3
Array.sort() is a static method of class Array, when you pass in a refrence as a value to that object it sorts the elements in ascending order but dosent return anything back the reason for this is because the actual object is being edited and not a copy, were as if you passed a primitive type to a method only copy of the value is passed therefore the original value is not affected.