$(function(){
    //code here
});что, как я знаю, является аналогом для$(document).ready(function(){
    //code here
});(function($){
    //code here
})(jQuery);(function($){
    $(function(){
        //code here
    });
})(jQuery);(function () {
	var test = 7;
})();
console.log(window.test); //undefinedvar myObject = function () {
	var test = 7; // Приватная переменная
	return {
		test: function (a) {
			console.log(a * test);
		}
	};
}();
myObject.test(5); // 35