File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/_js.view Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11function makeCounter ( ) {
22 let count = 0 ;
33
4- // ... your code ...
4+ // ... codul vostru ...
55}
66
77let counter = makeCounter ( ) ;
88
99alert ( counter ( ) ) ; // 0
1010alert ( counter ( ) ) ; // 1
1111
12- counter . set ( 10 ) ; // set the new count
12+ counter . set ( 10 ) ; // setează noul count
1313
1414alert ( 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)
Original file line number Diff line number Diff line change 11describe ( "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
You can’t perform that action at this time.
0 commit comments