diff --git a/some.js b/some.js new file mode 100644 index 0000000..33a1b41 --- /dev/null +++ b/some.js @@ -0,0 +1,10 @@ +var a = [2, 4, 5, 5, 1, 23, 5, 7, 8, 1, 1, 2, 3, 67, 8, 7]; + +function get_sort(a) { + var b = a.slice(); + return b.sort(function(a, b) { + return a - b; + }); +} + +alert(get_sort(a)); \ No newline at end of file