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 number Diff line number Diff line change 1
1
function makeCounter ( ) {
2
2
let count = 0 ;
3
3
4
- // ... your code ...
4
+ // ... codul vostru ...
5
5
}
6
6
7
7
let counter = makeCounter ( ) ;
8
8
9
9
alert ( counter ( ) ) ; // 0
10
10
alert ( counter ( ) ) ; // 1
11
11
12
- counter . set ( 10 ) ; // set the new count
12
+ counter . set ( 10 ) ; // setează noul count
13
13
14
14
alert ( counter ( ) ) ; // 10
15
15
16
- counter . decrease ( ) ; // decrease the count by 1
16
+ counter . decrease ( ) ; // scade count cu 1
17
17
18
- alert ( counter ( ) ) ; // 10 (instead of 11)
18
+ alert ( counter ( ) ) ; // 10 (în loc de 11)
Original file line number Diff line number Diff line change 1
1
describe ( "counter" , function ( ) {
2
2
3
- it ( "increases from call to call " , function ( ) {
3
+ it ( "crește de la un apel la altul " , function ( ) {
4
4
5
5
let counter = makeCounter ( ) ;
6
6
@@ -11,7 +11,7 @@ describe("counter", function() {
11
11
12
12
13
13
describe ( "counter.set" , function ( ) {
14
- it ( "sets the count" , function ( ) {
14
+ it ( "setează count" , function ( ) {
15
15
16
16
let counter = makeCounter ( ) ;
17
17
@@ -23,7 +23,7 @@ describe("counter", function() {
23
23
} ) ;
24
24
25
25
describe ( "counter.decrease" , function ( ) {
26
- it ( "decreases the count" , function ( ) {
26
+ it ( "scade count" , function ( ) {
27
27
28
28
let counter = makeCounter ( ) ;
29
29
You can’t perform that action at this time.
0 commit comments