Last active
March 10, 2019 12:14
-
-
Save ezhov-da/007f8edc522a2dc6a39aeb53ebc84ce2 to your computer and use it in GitHub Desktop.
пространство имен
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Для того, чтоб ввести пространство имен, к примеру [TEST] необходимо: | |
*/ | |
window.TEST = {}; | |
TEST.Util = (function(){ | |
var variable = 'переменные', | |
testFunction = function(){ | |
//что-то делаю | |
}, | |
TESTUtil; | |
return TESTUtil = { | |
'функция доступная из вне': function(){ | |
return variable; | |
} | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment