beautify 1st part of the tutorial

This commit is contained in:
Ilya Kantor 2015-03-10 12:36:58 +03:00
parent e3dd2cedc0
commit 6444024a9d
327 changed files with 2358 additions and 1986 deletions

View file

@ -11,13 +11,13 @@
var arr = [1, 2, 3, 4, 5];
*!*
function compareRandom(a, b) {
function compareRandom(a, b) {
return Math.random() - 0.5;
}
arr.sort(compareRandom);
*/!*
alert(arr); // элементы в случайном порядке, например [3,5,1,2,4]
alert( arr ); // элементы в случайном порядке, например [3,5,1,2,4]
```