TypedArray sort() JavaScript

The Javascript TypedArray sort() method sorts the array and returns the updated array.

Syntax:

Array.sort() 

Returns:
It returns the sorted array.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
function func() {  
var num = [32, 53, 83, 31, 34]   
document.write(num.sort());  
}  
func();
</script>
</body>
</html>

Output:

31,32,34,53,83
Please Share