Thursday, August 1, 2013

JavaScript arraysort

<html>
<body>

<script type="text/javascript">

var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits.sort());

</script>

</body>
</html>

Result

 

No comments: