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

@ -14,16 +14,16 @@ function Fridge(power) {
if (food.length + arguments.length >= this._power / 100) {
throw new Error("Нельзя добавить, не хватает мощности");
}
for(var i=0; i<arguments.length; i++) {
food.push(arguments[i]); // добавить всё из arguments
for (var i = 0; i < arguments.length; i++) {
food.push(arguments[i]); // добавить всё из arguments
}
};
this.getFood = function() {
// копируем еду в новый массив, чтобы манипуляции с ним не меняли food
return food.slice();
return food.slice();
};
}
```