Skip to content

Instantly share code, notes, and snippets.

@idoushiki
Last active November 30, 2017 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idoushiki/694b17d03c40da989a6492ce66072e63 to your computer and use it in GitHub Desktop.
Save idoushiki/694b17d03c40da989a6492ce66072e63 to your computer and use it in GitHub Desktop.
<html>
<script>
function print(ms){
document.write(ms,"<br>");
}
var a=[1,2,3]
var s=a.join("+");
print(a);
print(s);
var re=a.reverse();
print(re);
var bun=new Array("bbb","chhhh","apppp");
bun.sort();
print(bun);
var num=[33,4,1111,222];
num.sort();
num.sort(function(a,b){return a-b;});
print(num);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment