Skip to content

Commit 691200a

Browse files
committed
minor update
1 parent 7440355 commit 691200a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

1-js/06-advanced-functions/03-closure/10-make-army/_js.view/solution.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ function makeArmy() {
33
let shooters = [];
44

55
for(let i = 0; i < 10; i++) {
6-
let shooter = function() { // shooter function
7-
alert( i ); // should show its number
6+
let shooter = function() { // funcția shooter
7+
alert( i ); // ar trebui să arate numărul său
88
};
99
shooters.push(shooter);
1010
}

1-js/06-advanced-functions/03-closure/10-make-army/_js.view/source.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ function makeArmy() {
33

44
let i = 0;
55
while (i < 10) {
6-
let shooter = function() { // shooter function
7-
alert( i ); // should show its number
6+
let shooter = function() { // funcția shooter
7+
alert( i ); // ar trebui să arate numărul său
88
};
99
shooters.push(shooter);
1010
i++;
@@ -16,7 +16,7 @@ function makeArmy() {
1616
/*
1717
let army = makeArmy();
1818
19-
army[0](); // the shooter number 0 shows 10
20-
army[5](); // and number 5 also outputs 10...
21-
// ... all shooters show 10 instead of their 0, 1, 2, 3...
19+
army[0](); // numărul shooter 0 arată 10
20+
army[5](); // și numărul 5 de asemeni produce 10...
21+
// ... toți shooters arată 10 în loc de 0, 1, 2, 3...
2222
*/

1-js/06-advanced-functions/03-closure/10-make-army/_js.view/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ describe("army", function() {
77
window.alert = sinon.stub(window, "alert");
88
});
99

10-
it("army[0] shows 0", function() {
10+
it("army[0] arată 0", function() {
1111
army[0]();
1212
assert(alert.calledWith(0));
1313
});
1414

1515

16-
it("army[5] shows 5", function() {
16+
it("army[5] arată 5", function() {
1717
army[5]();
1818
assert(alert.calledWith(5));
1919
});

0 commit comments

Comments
 (0)