Skip to content

Commit 23d8abb

Browse files
committed
task 2
1 parent ebd31dd commit 23d8abb

File tree

2 files changed

+7
-7
lines changed
  • 1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/_js.view

2 files changed

+7
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
function makeCounter() {
22
let count = 0;
33

4-
// ... your code ...
4+
// ... codul vostru ...
55
}
66

77
let counter = makeCounter();
88

99
alert( counter() ); // 0
1010
alert( counter() ); // 1
1111

12-
counter.set(10); // set the new count
12+
counter.set(10); // setează noul count
1313

1414
alert( counter() ); // 10
1515

16-
counter.decrease(); // decrease the count by 1
16+
counter.decrease(); // scade count cu 1
1717

18-
alert( counter() ); // 10 (instead of 11)
18+
alert( counter() ); // 10 (în loc de 11)

Diff for: 1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/_js.view/test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
describe("counter", function() {
22

3-
it("increases from call to call", function() {
3+
it("crește de la un apel la altul", function() {
44

55
let counter = makeCounter();
66

@@ -11,7 +11,7 @@ describe("counter", function() {
1111

1212

1313
describe("counter.set", function() {
14-
it("sets the count", function() {
14+
it("setează count", function() {
1515

1616
let counter = makeCounter();
1717

@@ -23,7 +23,7 @@ describe("counter", function() {
2323
});
2424

2525
describe("counter.decrease", function() {
26-
it("decreases the count", function() {
26+
it("scade count", function() {
2727

2828
let counter = makeCounter();
2929

0 commit comments

Comments
 (0)