{"json_modified": "2016-09-27T05:26:40.558004", "uuid": "609c53b5-c44b-4d3c-8116-fe3af499b12c", "title": "Functions", "url": "/en-US/docs/Web/JavaScript/Reference/Functions", "tags": ["Function", "Functions", "JavaScript"], "translations": [{"uuid": "f3efb5ad-2d74-45c9-a9df-5296ad8d2303", "title": "\u0627\u0644\u062f\u0648\u0627\u0644", "url": "/ar/docs/Web/JavaScript/Reference/%D8%A7%D9%84%D8%AF%D9%88%D8%A7%D9%84", "tags": [], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function will\u00a0return a value.", "localization_tags": ["inprogress"], "locale": "ar", "last_edit": "2016-06-16T01:20:16", "review_tags": []}, {"uuid": "6bd1f251-c7ad-4645-8f78-ebf8d6b0a82e", "title": "Functions", "url": "/bn-BD/docs/Web/JavaScript/Reference/Functions", "tags": ["NeedReview"], "summary": "\u09b8\u09be\u09a7\u09be\u09b0\u09a3 \u0995\u09a5\u09be\u09df \u098f\u0995\u099f\u09bf \u09ab\u09be\u0982\u09b6\u09a8 \u09b9\u09b2 \u098f\u0995\u099f\u09bf \"\u09b8\u09be\u09ac-\u0995\u09be\u09b0\u09cd\u09af\u0995\u09cd\u09b0\u09ae\" \u09af\u09c7\u099f\u09be \u0995\u09c7 \u0995\u09cb\u09a1-\u09ac\u09b9\u09bf\u09b0\u09cd\u09ad\u09c2\u09a4( \u0985\u09a5\u09ac\u09be \u0985\u09ad\u09cd\u09af\u09a8\u09cd\u09a4\u09b0\u09c0\u09a3 \u09b0\u09bf\u0995\u09be\u09b0\u09b8\u09a8 \u09ae\u09c7\u09a5\u09a1 ) \u09ac\u09b2\u09be \u09af\u09be\u09df \u0964 \u098f\u099f\u09bf \u098f\u0995\u099f\u09bf \u0995\u09be\u09b0\u09cd\u09af\u0995\u09cd\u09b0\u09ae \u098f\u09b0 \u09ae\u09a4\u09a8 \u0987 , \u098f\u0995 \u0995\u09be\u09b0\u09cd\u09af\u0995\u09cd\u09b0\u09ae \u09af\u09be \u098f\u0995\u099f\u09bf \u09ac\u09bf\u09ac\u09cd\u09b0\u09a4\u09bf\u09b0 \u0995\u09cd\u09b0\u09ae \u0985\u09a8\u09c1\u09af\u09be\u09df\u09c0 \u0995\u09be\u099c \u0995\u09b0\u09c7 \u098f\u09ac\u0982 \u09a4\u09be\u0995\u09c7 \u09ab\u09be\u0982\u09b6\u09a8-\u09ac\u09a1\u09bf \u09ac\u09b2\u09be \u09b9\u09df\u09c7 \u09a5\u09be\u0995\u09c7 \u0964", "localization_tags": ["inprogress"], "locale": "bn-BD", "last_edit": "2015-06-17T06:53:25", "review_tags": ["editorial"]}, {"uuid": "955635e5-c45a-4607-93d1-3d88fa705042", "title": "Functions", "url": "/ca/docs/Web/JavaScript/Reference/Functions", "tags": ["NeedsTranslation", "Function", "Functions", "TopicStub", "JavaScript"], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function can return a value.", "localization_tags": ["inprogress"], "locale": "ca", "last_edit": "2015-07-01T16:29:37", "review_tags": []}, {"uuid": "df8dd224-d799-4f4a-a648-1af72480c043", "title": "Functions and function scope", "url": "/cs/docs/Web/JavaScript/Reference/Functions", "tags": ["Guide", "TopicStub", "NeedsTranslation", "NeedsHelp", "JavaScript"], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function can return a value.", "localization_tags": ["inprogress"], "locale": "cs", "last_edit": "2015-04-26T07:37:38", "review_tags": []}, {"uuid": "20ffe2ec-1194-413b-9543-854991e29b2f", "title": "Functions", "url": "/de/docs/Web/JavaScript/Reference/Functions", "tags": ["NeedsTranslation", "Function", "Functions", "TopicStub", "JavaScript"], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function can return a value.", "localization_tags": ["inprogress"], "locale": "de", "last_edit": "2015-01-29T04:57:33", "review_tags": []}, {"uuid": "5b56a8e8-376f-437f-a10b-5cebca7ffe0d", "title": "Funciones", "url": "/es/docs/Web/JavaScript/Referencia/Funciones", "tags": ["Funciones", "Guia", "funci\u00f3n", "JavaScript"], "summary": "En t\u00e9rminos generales, una funci\u00f3n es un \"subprograma\" que puede ser llamado por c\u00f3digo externo (o interno en caso de recursi\u00f3n) a la funci\u00f3n. Al igual que el programa en s\u00ed mismo, una funci\u00f3n se compone de una secuencia de declaraciones, que conforman el llamado cuerpo de la funci\u00f3n. Se pueden pasar valores a una funci\u00f3n, y la funci\u00f3n puede devolver un valor.", "localization_tags": ["inprogress"], "locale": "es", "last_edit": "2016-06-14T12:59:59", "review_tags": ["technical", "editorial"]}, {"uuid": "5e868cd9-21fb-44ac-ba93-98cf16142abd", "title": "Fonctions et port\u00e9e des fonctions", "url": "/fr/docs/Web/JavaScript/Reference/Fonctions", "tags": ["R\u00e9f\u00e9rence", "Function", "JavaScript"], "summary": "En JavaScript, les fonctions sont des objets de premi\u00e8re classe. Cela signifie qu'elles peuvent \u00eatre manipul\u00e9es et \u00e9chang\u00e9es, qu'elles peuvent avoir des propri\u00e9t\u00e9s et des m\u00e9thodes, comme tous les autres objets JavaScript. Les fonctions sont des objets Function
.", "localization_tags": [], "locale": "fr", "last_edit": "2016-09-26T03:47:43", "review_tags": []}, {"uuid": "408510c2-f71f-44c9-ad10-9a4bc88bc398", "title": "Funzioni", "url": "/it/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": [], "summary": "Parlando in termini\u00a0generici, una funzione \u00e8 un \"sottopogramma\" che pu\u00f2 essere\u00a0chiamato\u00a0da un codice esterno (o interno nel caso di ricorsione) alla funzione stessa. Come il programma stesso, una funzione \u00e8 composta da una sequenza di istruzioni chiamata corpo della funzione. Ad una funzione\u00a0possono essere\u00a0passati\u00a0valori, e la funzione restituisce un valore.", "localization_tags": ["inprogress"], "locale": "it", "last_edit": "2016-01-06T10:28:34", "review_tags": []}, {"uuid": "35aafbcb-a3d2-4ca4-9380-dd7264461d27", "title": "\u95a2\u6570\u3068\u95a2\u6570\u30b9\u30b3\u30fc\u30d7", "url": "/ja/docs/Web/JavaScript/Reference/Functions_and_function_scope", "tags": [], "summary": "\u4e00\u822c\u7684\u306b\u8a00\u3046\u3068\u3001\u95a2\u6570\u3068\u306f\u5916\u90e8 (\u518d\u5e30\u306e\u5834\u5408\u306f\u5185\u90e8) \u304b\u3089 \u547c\u3070\u308c\u308b \u3053\u3068\u306e\u3067\u304d\u308b\u300c\u30b5\u30d6\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u305d\u306e\u3082\u306e\u306e\u3088\u3046\u306b\u3001\u95a2\u6570\u306f\u95a2\u6570\u672c\u4f53\u3068\u547c\u3070\u308c\u308b\u9023\u7d9a\u3057\u305f\u6587\u3067\u69cb\u6210\u3055\u308c\u307e\u3059\u3002\u5024\u3092\u95a2\u6570\u306b \u6e21\u3059 \u4e8b\u304c\u3067\u304d\u3001\u95a2\u6570\u306f\u5024\u3092 \u8fd4\u3059 \u4e8b\u304c\u3067\u304d\u307e\u3059\u3002", "localization_tags": ["inprogress"], "locale": "ja", "last_edit": "2015-04-17T01:32:07", "review_tags": []}, {"uuid": "60f80c93-25fe-433b-b3dd-139010a633b9", "title": "\ud568\uc218", "url": "/ko/docs/Web/JavaScript/Reference/Functions", "tags": ["Function", "JavaScript"], "summary": "\uc77c\ubc18\uc801\uc73c\ub85c, \ud568\uc218\ub294 \ud568\uc218 \uc678\ubd80 (\ub610\ub294 \uc7ac\uadc0(recursion)\uc758 \uacbd\uc6b0\uc5d4 \ub0b4\ubd80) \ucf54\ub4dc\uc5d0 \uc758\ud574 \ud638\ucd9c\ub420 \uc218 \uc788\ub294 \"\ud558\uc704\ud504\ub85c\uadf8\ub7a8\"\uc785\ub2c8\ub2e4. \ud504\ub85c\uadf8\ub7a8 \uadf8 \uc790\uccb4\ucc98\ub7fc, \ud568\uc218\ub294 \ud568\uc218 \ubab8\ud1b5(function body)\uc774\ub77c\uace0 \ud558\ub294 \uc77c\ub828\uc758 \ubb38(statement)\uc73c\ub85c \uad6c\uc131\ub429\ub2c8\ub2e4. \uac12\uc740 \ud568\uc218\uc5d0 \uc804\ub2ec\ub420 \uc218 \uc788\uace0 \ud568\uc218\ub294 \uac12\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4.", "localization_tags": [], "locale": "ko", "last_edit": "2016-07-02T22:50:30", "review_tags": []}, {"uuid": "358ac0c0-c5f0-4dc1-b27d-a12d4adc53ff", "title": "Functions", "url": "/nl/docs/Web/JavaScript/Reference/Functions", "tags": ["Functions", "TopicStub", "NeedsTranslation", "JavaScript", "Function"], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function will\u00a0return a value.", "localization_tags": ["inprogress"], "locale": "nl", "last_edit": "2015-12-05T01:47:57", "review_tags": []}, {"uuid": "9b5e20af-98ec-44ab-b830-19929d2bcf0b", "title": "Fun\u00e7\u00f5es", "url": "/pt-BR/docs/Web/JavaScript/Reference/Functions", "tags": ["TopicStub", "Fun\u00e7\u00f5es", "NeedsTranslation", "JavaScript"], "summary": "De modo geral, fun\u00e7\u00e3o \u00e9 um \"subprograma\" que pode ser chamado por c\u00f3digo externo (ou interno no caso de recurs\u00e3o) \u00e0 fun\u00e7\u00e3o. Assim como um programa, uma fun\u00e7\u00e3o \u00e9 composta por uma sequ\u00eancia de instru\u00e7\u00f5es chamada corpo da fun\u00e7\u00e3o. Valores podem ser passados para uma fun\u00e7\u00e3o e ela\u00a0pode retornar um valor.", "localization_tags": ["inprogress"], "locale": "pt-BR", "last_edit": "2016-08-17T16:07:59", "review_tags": []}, {"uuid": "3fd67be9-99f2-405e-be1a-57657f90c290", "title": "\u0424\u0443\u043d\u043a\u0446\u0438\u0438", "url": "/ru/docs/Web/JavaScript/Reference/Functions", "tags": ["\u0424\u0443\u043d\u043a\u0446\u0438\u0438", "\u0424\u0443\u043d\u043a\u0446\u0438\u044f"], "summary": "\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0\u2014 \u044d\u0442\u043e \"\u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\", \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e (\u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438) \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u041a\u0430\u043a \u0438 \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0442\u0435\u043b\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b\u00a0\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.", "localization_tags": [], "locale": "ru", "last_edit": "2016-08-24T00:15:04", "review_tags": ["technical", "editorial"]}, {"uuid": "3d3d30b9-6063-4803-8d67-edd51650b83c", "title": "Functions", "url": "/uk/docs/Web/JavaScript/Reference/Functions", "tags": [], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function will\u00a0return a value.", "localization_tags": ["inprogress"], "locale": "uk", "last_edit": "2016-03-12T14:04:32", "review_tags": []}, {"uuid": "08ae0de7-a7fe-422a-ba95-b5ee40ad277e", "title": "\u51fd\u6570", "url": "/zh-CN/docs/Web/JavaScript/Reference/Functions", "tags": ["Function", "\u51fd\u6570\u58f0\u660e", "JavaScript"], "summary": "\u901a\u5e38\u6765\u8bf4\uff0c\u4e00\u4e2a\u51fd\u6570\u5c31\u662f\u4e00\u4e2a\u53ef\u4ee5\u88ab\u5916\u90e8\u4ee3\u7801\u8c03\u7528(\u6216\u8005\u51fd\u6570\u672c\u8eab\u9012\u5f52\u8c03\u7528)\u7684\"\u5b50\u7a0b\u5e8f\"\u3002\u548c\u7a0b\u5e8f\u672c\u8eab\u4e00\u6837\uff0c\u4e00\u4e2a\u51fd\u6570\u7684\u51fd\u6570\u4f53\u662f\u7531\u4e00\u7cfb\u5217\u7684\u8bed\u53e5\u7ec4\u6210\u7684\u3002\u51fd\u6570\u53ef\u4ee5\u63a5\u6536\u4f20\u5165\u53c2\u6570\uff0c\u4e5f\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u503c\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2016-09-27T05:26:16", "review_tags": []}, {"uuid": "54452a7a-57f5-4857-92f7-fbaad8adb87c", "title": "Functions", "url": "/zh-TW/docs/Web/JavaScript/Reference/Functions", "tags": ["NeedsTranslation", "Function", "Functions", "TopicStub", "JavaScript"], "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function can return a value.", "localization_tags": ["inprogress"], "locale": "zh-TW", "last_edit": "2016-08-23T03:00:22", "review_tags": []}], "modified": "2016-09-23T20:21:48", "label": "Functions", "localization_tags": [], "locale": "en-US", "id": 777, "last_edit": "2016-09-23T20:21:35", "summary": "Generally speaking, a function is a \"subprogram\" that can be called 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 function body. Values can be passed to a function, and the function will\u00a0return a value.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Description", "title": "Description"}, {"id": "Defining_functions", "title": "Defining functions"}, {"id": "The_function_declaration_(function_statement)", "title": "The function declaration ("}, {"id": "The_function_expression_(function_expression)", "title": "The function expression ("}, {"id": "The_generator_function_declaration_(function*_statement)", "title": "The generator function declaration ("}, {"id": "The_generator_function_expression_(function*_expression)", "title": "The generator function expression ("}, {"id": "The_arrow_function_expression_(>)", "title": "The arrow function expression (=>)"}, {"id": "The_Function_constructor", "title": "The "}, {"id": "The_GeneratorFunction_constructor", "title": "The "}, {"id": "Function_parameters", "title": "Function parameters"}, {"id": "Default_parameters", "title": "Default parameters"}, {"id": "Rest_parameters", "title": "Rest parameters"}, {"id": "The_arguments_object", "title": "The "}, {"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": null}, {"id": "Differences", "title": "Differences"}, {"id": "Examples", "title": "Examples"}, {"id": "Block-level_functions", "title": "Block-level functions"}, {"id": "Block-level_functions_in_non-strict_code", "title": "Block-level functions in non-strict code"}, {"id": "Examples_2", "title": "Examples"}, {"id": "Returning_a_formatted_number", "title": "Returning a formatted number"}, {"id": "Determining_whether_a_function_exists", "title": "Determining whether a function exists"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/JavaScript/Reference/Functions", "review_tags": []}