Sublime Text
<!DOCTYPE html> <html> <body> <p id="demo1"></p> <p id="demo2"></p> <script> var fruits = ["Orange", "Mango", "Banana", "Apple"]; document.getElementById("demo1").innerHTML = fruits; fruits.sort(); document.getElementById("demo2").innerHTML = fruits; </script> </body> </html>
<!DOCTYPE html> <html> <body> <p id="demo1"></p> <p id="demo2"></p> <script> var fruits = ["Orange", "Mango", "Banana", "Apple"]; document.getElementById("demo1").innerHTML = fruits; fruits.sort(); document.getElementById("demo2").innerHTML = fruits; </script> </body> </html>