File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 818
818
```javascript
819
819
820
820
// 5.1.1
821
- // A Practical Module
821
+ // Практичен модул
822
822
823
823
(function( global ) {
824
824
var Module = (function() {
825
825
826
826
var data = "secret";
827
827
828
828
return {
829
- // This is some boolean property
829
+ // Логическо свойство
830
830
bool: true,
831
- // Some string value
831
+ // Стойност от тип низ
832
832
string: "a string",
833
- // An array property
833
+ // Свойство - масив
834
834
array: [ 1, 2, 3, 4 ],
835
- // An object property
835
+ // Свойство - обект
836
836
object: {
837
- lang: "en-Us "
837
+ lang: "bg-BG "
838
838
},
839
839
getData: function() {
840
- // get the current value of `data`
840
+ // вземете текущата стойност на променливата `data`
841
841
return data;
842
842
},
843
843
setData: function( value ) {
844
- // set the value of `data` and return it
844
+ // присвоете стойността на `data` и я върнете
845
845
return ( data = value );
846
846
}
847
847
};
848
848
})();
849
849
850
- // Other things might happen here
850
+ // Други декларации
851
851
852
- // expose our module to the global object
852
+ // добавамя нашия модъл към глобалния обект
853
853
global.Module = Module;
854
854
855
855
})( this );
859
859
```javascript
860
860
861
861
// 5.2.1
862
- // A Practical Constructor
862
+ // Практичен Конструктор
863
863
864
864
(function( global ) {
865
865
879
879
};
880
880
881
881
882
- // To call constructor ' s without ` new` , you might do this :
882
+ // За да извикате конструктора без `new`, можете да направите това :
883
883
var ctor = function( foo ) {
884
884
return new Ctor( foo );
885
885
};
886
886
887
887
888
- // expose our constructor to the global object
888
+ // добави нашия конструктор към глобалния обект
889
889
global.ctor = ctor;
890
890
891
891
})( this );
You can’t perform that action at this time.
0 commit comments