Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Sort a Numeric Array</title> </head> <body> <script> var numbers = [5, 20, 10, 75, 50, 100]; numbers.sort(); // Sorts numbers array document.write(numbers); // Outputs: 10,100,20,5,50,75 </script> </body> </html>