{"json_modified": "2014-11-16T10:14:00.773962", "slug": "Web/JavaScript/Reference/Functions", "tags": [], "locale": "ru", "title": "\u0424\u0443\u043d\u043a\u0446\u0438\u0438", "translations": [{"title": "\u51fd\u6570\u548c\u51fd\u6570\u4f5c\u7528\u57df", "url": "/zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": [], "summary": "", "localization_tags": [], "locale": "zh-CN", "last_edit": "2014-07-23T21:14:26", "review_tags": []}, {"title": "Functions", "url": "/en-US/docs/Web/JavaScript/Reference/Functions", "tags": ["Function", "Functions", "JavaScript"], "summary": "", "localization_tags": [], "locale": "en-US", "last_edit": "2014-09-24T05:01:15", "review_tags": []}, {"title": "\u95a2\u6570\u3068\u95a2\u6570\u30b9\u30b3\u30fc\u30d7", "url": "/ja/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": ["MDC Project", "NeedsTechnicalReview"], "summary": "", "localization_tags": [], "locale": "ja", "last_edit": "2013-09-17T05:46:20", "review_tags": []}, {"title": "Funciones", "url": "/es/docs/Web/JavaScript/Referencia/Funciones", "tags": ["Guide", "function scope", "JavaScript"], "summary": "", "localization_tags": ["inprogress"], "locale": "es", "last_edit": "2014-08-13T22:12:39", "review_tags": []}, {"title": "Fonctions et port\u00e9e des fonctions", "url": "/fr/docs/Web/JavaScript/Reference/Fonctions_et_portee_des_fonctions", "tags": ["R\u00e9f\u00e9rence JavaScript"], "summary": "", "localization_tags": [], "locale": "fr", "last_edit": "2014-06-13T11:31:21", "review_tags": []}, {"title": "Functions and function scope", "url": "/it/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": [], "summary": "", "localization_tags": [], "locale": "it", "last_edit": "2014-07-03T07:52:04", "review_tags": []}, {"title": "Functions and function scope", "url": "/cs/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": ["Guide", "TopicStub", "NeedsTranslation", "NeedsHelp", "JavaScript"], "summary": "Editorial review completed.", "localization_tags": [], "locale": "cs", "last_edit": "2014-04-06T09:02:05", "review_tags": []}, {"title": "Functions", "url": "/pt-BR/docs/Web/JavaScript/Reference/Functions", "tags": ["NeedsTranslation", "Function", "Functions", "TopicStub", "JavaScript"], "summary": "", "localization_tags": ["inprogress"], "locale": "pt-BR", "last_edit": "2014-09-24T05:01:15", "review_tags": []}], "modified": "2014-11-16T10:13:59", "label": "\u0424\u0443\u043d\u043a\u0446\u0438\u0438", "localization_tags": [], "url": "/ru/docs/Web/JavaScript/Reference/Functions", "last_edit": "2014-11-15T10:27:36", "summary": "Generally speaking, a function is a \"subprogram\" that can be <em>called</em> by code external (or internal in the case of recursion) to the function. Like the program itself, a function is composed of a sequence of statements called the <em>function body</em>. Values can be <em>passed</em> to a function, and the function can <em>return</em> a value.", "sections": [{"id": "Quick_Links", "title": "JavaScript \u0423\u0440\u043e\u043a\u0438: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e JavaScript LiveConnect Overview \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0417\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u041e\u0431 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u041e\u0431 \u044d\u0442\u043e\u043c \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0435 \u041e\u0431\u0437\u043e\u0440 JavaScript \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0421 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u041e\u0431\u0437\u043e\u0440 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 JavaScript \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 JavaScript \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 JavaScript \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 JavaScript \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0438 \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0421\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0422\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b JavaScript \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b Array Boolean Date Error EvalError Function Infinity InternalError Intl Intl.Collator Intl.DateTimeFormat Intl.NumberFormat Iterator JSON Map Math NaN Number Object ParallelArray Promise RangeError ReferenceError RegExp Set String Symbol SyntaxError TypeError URIError isNaN null undefined \u041f\u0440\u043e\u043a\u0441\u0438 \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b Assignment operators delete function expression typeof \u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0417\u0430\u043f\u044f\u0442\u0430\u044f \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a_\u043f\u043e_JavaScript_1.5/\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438/\u0411\u0438\u0442\u043e\u0432\u044b\u0435_\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f break const continue for...of function* label let throw \u0424\u0443\u043d\u043a\u0446\u0438\u0438 Rest parameters \u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0415\u0449\u0451 \u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0430 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 JavaScript \u0421\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0421\u0442\u0440\u043e\u043a\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0418\u043d\u0434\u0435\u043a\u0441 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0418\u043d\u0434\u0435\u043a\u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0418\u043d\u0434\u0435\u043a\u0441 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u00abJavaScript\u00bb \u0412\u043d\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434 \u0421\u0442\u0430\u0442\u0443\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e JavaScript \u041f\u0440\u043e\u0435\u043a\u0442 MDN"}, {"id": "Summary", "title": "\u0421\u0432\u043e\u0434\u043a\u0430"}, {"id": ".D0.9E.D0.BF.D0.B8.D1.81.D0.B0.D0.BD.D0.B8.D0.B5", "title": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435"}, {"id": "Defining_functions", "title": "Defining functions"}, {"id": "The_function_declaration_.28function_statement.29", "title": "The function declaration ( function statement)"}, {"id": "The_function_expression_.28function_operator.29", "title": "The function expression ( function operator)"}, {"id": "The_arrow_function_expression_(.3D>)", "title": "The arrow function expression (=>)"}, {"id": "The_Function_constructor", "title": "The Function constructor"}, {"id": "Function_parameters", "title": "Function parameters"}, {"id": "Default_parameters", "title": "Default parameters"}, {"id": "Rest_parameters", "title": "Rest parameters"}, {"id": "The_arguments_object", "title": "The arguments object"}, {"id": "Defining_method_functions", "title": "Defining method functions"}, {"id": "Getter_and_setter_functions", "title": "Getter and setter functions"}, {"id": "Method_definition_syntax", "title": "Method definition syntax"}, {"id": "Function_constructor_vs._function_declaration_vs._function_expression", "title": "Function constructor vs. function declaration vs. function expression"}, {"id": "Differences", "title": "Differences"}, {"id": "Examples_2", "title": "Examples"}, {"id": "Conditionally_defining_a_function", "title": "Conditionally defining a function"}, {"id": "Examples", "title": "Examples"}, {"id": "Example:_Returning_a_formatted_number", "title": "Example: Returning a formatted number"}, {"id": "Example:_Determining_whether_a_function_exists", "title": "Example: Determining whether a function exists"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "id": 130289, "review_tags": ["technical", "editorial"]}