File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 830
830
` ` ` javascript
831
831
832
832
// 5.1.1
833
- // A Practical Module
833
+ // Ένα Practical Module
834
834
835
835
(function( global ) {
836
836
var Module = (function() {
837
837
838
838
var data = "secret";
839
839
840
840
return {
841
- // This is some boolean property
841
+ // Αυτό είναι boolean property
842
842
bool: true,
843
- // Some string value
843
+ // Ένα string value
844
844
string: "a string",
845
- // An array property
845
+ // Ένα array property
846
846
array: [ 1, 2, 3, 4 ],
847
- // An object property
847
+ // Ένα object property
848
848
object: {
849
849
lang: "en-Us"
850
850
},
851
851
getData: function() {
852
- // get the current value of ` data`
852
+ // Επιστρέφει την τωρινή τιμή του ` data`
853
853
return data;
854
854
},
855
855
setData: function( value ) {
856
- // set the value of ` data` and return it
856
+ // θέτει την τιμή του ` data` και την επιστρέφει
857
857
return ( data = value );
858
858
}
859
859
};
860
860
})();
861
861
862
- // Other things might happen here
862
+ // Άλλα πράγματα μπορούν να γίνουν εδώ
863
863
864
- // expose our module to the global object
864
+ // Έκθεση του module στο global object
865
865
global.Module = Module;
866
866
867
867
})( this );
871
871
` ` ` javascript
872
872
873
873
// 5.2.1
874
- // A Practical Constructor
874
+ // Ένα Practical Constructor
875
875
876
876
(function( global ) {
877
877
891
891
};
892
892
893
893
894
- // To call constructor's without ` new ` , you might do this :
894
+ // Για να καλέσετε constructor χωρίς ` new ` , μπορείτε να κάνετε αυτό :
895
895
var ctor = function( foo ) {
896
896
return new Ctor( foo );
897
897
};
898
898
899
899
900
- // expose our constructor to the global object
900
+ // Έκθεση του constructor στο global object
901
901
global.ctor = ctor;
902
902
903
903
})( this );
You can’t perform that action at this time.
0 commit comments