Last active
December 20, 2015 13:09
-
-
Save ravidaram/6136564 to your computer and use it in GitHub Desktop.
arraysjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<title><!-- Insert your title here --></title> | |
</head> | |
<body> | |
<script> | |
var strings=["a", "abcdefghijkl","ab","abcdefg","abcd"] | |
strings.sort(); | |
strings.reverse(); | |
strings.sort(); | |
var counter=0; | |
for (counter=0; counter<strings.length; counter++) | |
document.write(strings[counter] + "<br>"); | |
</script> | |
</script> | |
<!-- Insert your content here --> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment