Created
February 4, 2014 18:35
-
-
Save LESTADru/8809570 to your computer and use it in GitHub Desktop.
>массив arrSorted — из тех же элементов, но отсортированный.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>массив arrSorted — из тех же элементов, но отсортированный.</title> | |
</head> | |
<body> | |
<script> | |
'use strict' | |
var arr = [ "HTML", "JavaScript", "CSS" ]; | |
var arrSorted = []; | |
arrSorted = arr.slice().sort(); | |
arrSorted.sort(); | |
alert(arrSorted);// CSS, HTML, JavaScript | |
alert(arr); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment