{"id":3322,"date":"2017-08-09T19:56:37","date_gmt":"2017-08-09T16:56:37","guid":{"rendered":"http:\/\/kamil-abzalov.com\/tutorials\/javascript-properties-and-functions\/"},"modified":"2020-06-14T23:16:14","modified_gmt":"2020-06-14T20:16:14","slug":"javascript-properties-and-functions","status":"publish","type":"post","link":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/","title":{"rendered":"JavaScript. Properties and functions"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_fullwidth_header title=&#8221;JavaScript. Properties and functions&#8221; content_max_width=&#8221;none&#8221; _builder_version=&#8221;3.16&#8243; button_one_letter_spacing_hover=&#8221;0&#8243; button_two_letter_spacing_hover=&#8221;0&#8243; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;on&#8221; button_one_letter_spacing__hover=&#8221;0&#8243; button_two_letter_spacing__hover_enabled=&#8221;on&#8221; button_two_letter_spacing__hover=&#8221;0&#8243; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_fullwidth_header][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;3.25&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; custom_padding=&#8221;0px|||&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_dcsbcm_divi_breadcrumbs_module homebreadcrumbtext=&#8221;Home&#8221; hide_currentbreadcrumb=&#8221;off&#8221; _builder_version=&#8221;4.4.2&#8243; custom_padding=&#8221;0px|||&#8221; fontsbreadcrumbs_font_size_tablet=&#8221;51&#8243; fontsbreadcrumbs_line_height_tablet=&#8221;2&#8243; fontsseperator_font_size_tablet=&#8221;51&#8243; fontsseperator_line_height_tablet=&#8221;2&#8243; fontsbreadcrumblinks_font_size_tablet=&#8221;51&#8243; fontsbreadcrumblinks_line_height_tablet=&#8221;2&#8243;][\/et_pb_dcsbcm_divi_breadcrumbs_module][et_pb_text _builder_version=&#8221;3.27.4&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;]In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks &#8211; functions.<br \/>\n[\/et_pb_text][et_pb_video src=&#8221;https:\/\/www.youtube.com\/watch?v=ZF5LCMTm5kI&#8221; _builder_version=&#8221;3.0.47&#8243;][\/et_pb_video][et_pb_text _builder_version=&#8221;3.27.4&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;]Function is subprogramm which works with any data and returns any result. Function often needs some secondary data &#8211; <strong>parameters.<\/strong> Besides, function has got a name (it is recommended, functions name tell developers, what it does) and function body &#8211; code. For example:<br \/>\n[\/et_pb_text][et_pb_dmb_code_snippet title=&#8221;Code lesson (js)&#8221; code=&#8221;ZnVuY3Rpb24gZnVuY3Rpb25fbmFtZSAoYXJndW1lbnQpIHsKCS8vIGJvZHkuLi4KfQ==&#8221; admin_label=&#8221;\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430&#8221; style=&#8221;docco&#8221; linenums=&#8221;on&#8221; usetabwidth=&#8221;on&#8221; tabwidth=&#8221;4&#8243; _builder_version=&#8221;4.4.2&#8243;]ZnVuY3Rpb24gZnVuY3Rpb25fbmFtZSAoYXJndW1lbnQpIHsKCS8vIGJvZHkuLi4KfQ==[\/et_pb_dmb_code_snippet][et_pb_text _builder_version=&#8221;3.27.4&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;]All languages has got its own functions. But always developers need to write their custom functions, because language functions can&#8217;t satisfy developer with him tasks.<br \/>\n[\/et_pb_text][et_pb_dmb_code_snippet title=&#8221;Code lesson (js)&#8221; code=&#8221;dmFyIHN0ciA9ICLQryDQu9GO0LHQu9GOIGphdmFTY3JpcHQiOwpjb25zb2xlLmxvZyhzdHIubGVuZ3RoKTsKCi8vY2hhckF0KCkKCnZhciBzeW1iID0gc3RyLmNoYXJBdCgwKTsKCmNvbnNvbGUubG9nKHN5bWIpOwoKc3RyID0gc3RyLnRvVXBwZXJDYXNlKCk7CmNvbnNvbGUubG9nKHN0cik7CgoKZnVuY3Rpb24gc3VtbWEoYSxiKSB7Cgl2YXIgcyA9IGEgKyBiOwoJcmV0dXJuIHM7CQkKfQoKdmFyIHJlcyA9IHN1bW1hKDUsMTApOwpjb25zb2xlLmxvZyhyZXMpOwoKCmZ1bmN0aW9uIGRpdmlzaW9uKGEsYikgewoJaWYoYiA9PSAwKSB7CgkJYWxlcnQoItCd0LAg0L3Rg9C70Ywg0LTQtdC70LjRgtGMINC90LXQu9GM0LfRjyIpOwoJCXJldHVybiBmYWxzZTsKCX0JCgl2YXIgZCA9IGEvYjsKCXJldHVybiBkOwp9Cgp2YXIgZGl2ID0gZGl2aXNpb24oMTAsNSk7CmNvbnNvbGUubG9nKGRpdik7&#8243; admin_label=&#8221;\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430 &#8221; style=&#8221;docco&#8221; linenums=&#8221;on&#8221; usetabwidth=&#8221;on&#8221; tabwidth=&#8221;4&#8243; _builder_version=&#8221;4.4.2&#8243;]dmFyIHN0ciA9ICLQryDQu9GO0LHQu9GOIGphdmFTY3JpcHQiOwpjb25zb2xlLmxvZyhzdHIubGVuZ3RoKTsKCi8vY2hhckF0KCkKCnZhciBzeW1iID0gc3RyLmNoYXJBdCgwKTsKCmNvbnNvbGUubG9nKHN5bWIpOwoKc3RyID0gc3RyLnRvVXBwZXJDYXNlKCk7CmNvbnNvbGUubG9nKHN0cik7CgoKZnVuY3Rpb24gc3VtbWEoYSxiKSB7Cgl2YXIgcyA9IGEgKyBiOwoJcmV0dXJuIHM7CQkKfQoKdmFyIHJlcyA9IHN1bW1hKDUsMTApOwpjb25zb2xlLmxvZyhyZXMpOwoKCmZ1bmN0aW9uIGRpdmlzaW9uKGEsYikgewoJaWYoYiA9PSAwKSB7CgkJYWxlcnQoItCd0LAg0L3Rg9C70Ywg0LTQtdC70LjRgtGMINC90LXQu9GM0LfRjyIpOwoJCXJldHVybiBmYWxzZTsKCX0JCgl2YXIgZCA9IGEvYjsKCXJldHVybiBkOwp9Cgp2YXIgZGl2ID0gZGl2aXNpb24oMTAsNSk7CmNvbnNvbGUubG9nKGRpdik7[\/et_pb_dmb_code_snippet][et_pb_comments _builder_version=&#8221;4.4.2&#8243; custom_margin=&#8221;30px||||false|false&#8221; hover_enabled=&#8221;0&#8243;][\/et_pb_comments][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks &#8211; functions. Function is subprogramm which works with any data and returns any result. Function often needs some secondary data &#8211; parameters. Besides, function [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u0438\u044f <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<\/strong>\u0438 <strong>\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430.\u00a0<\/strong>\u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0411\u044b\u043b\u043e \u0431\u044b \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439. <!--more-->\r\n\r\nhttps:\/\/www.youtube.com\/watch?v=ZF5LCMTm5kI\r\n\r\n\u0424\u0443\u043d\u043a\u0446\u0438\u044f - \u044d\u0442\u043e \u043d\u0435\u043a\u0430\u044f \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0427\u0430\u0441\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0435\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 - <strong>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/strong>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0446\u0435\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 - \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u0434 (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b) \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:\r\n\r\n<pre><code>function function_name (argument) {\r\n    \/\/ body...\r\n}\r\n<\/code><\/pre>\r\n\r\n\u041a\u0430\u043a \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c, \u0447\u0430\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e\u0431\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0431\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:\r\n\r\n<pre><code>function function_name (argument) {\r\n    \/\/ body...\r\n        return someResult;\r\n}\r\n<\/code><\/pre>\r\n\r\n\u0412 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f,\r\n\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0438 \u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\r\n\r\n\u041a\u043e\u0434 script.js\r\n\r\n<pre><code>[code lang=\"html\"]\r\nvar str = \"\u042f \u043b\u044e\u0431\u043b\u044e javaScript\";\r\nconsole.log(str.length);\r\n\r\n\/\/charAt()\r\n\r\nvar symb = str.charAt(0);\r\n\r\nconsole.log(symb);\r\n\r\nstr = str.toUpperCase();\r\nconsole.log(str);\r\n\r\n\r\nfunction summa(a,b) {\r\n    var s = a + b;\r\n    return s;       \r\n}\r\n\r\nvar res = summa(5,10);\r\nconsole.log(res);\r\n\r\n\r\nfunction division(a,b) {\r\n    if(b == 0) {\r\n        alert(\"\u041d\u0430 \u043d\u0443\u043b\u044c \u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f\");\r\n        return false;\r\n    }   \r\n    var d = a\/b;\r\n    return d;\r\n}\r\n\r\nvar div = division(10,5);\r\nconsole.log(div);\r\n<\/code><\/pre>","_et_gb_content_width":"","footnotes":""},"categories":[256,219],"tags":[230,229],"class_list":["post-3322","post","type-post","status-publish","format-standard","hentry","category-javascript","category-tutorials","tag-javascript-en","tag-js-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript. Properties and functions - Kamil Abzalov&#039;s blog<\/title>\n<meta name=\"description\" content=\"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript. Properties and functions - Kamil Abzalov&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kamabzalov\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-09T16:56:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-14T20:16:14+00:00\" \/>\n<meta name=\"author\" content=\"Kamil&#039; Abzalov\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"JavaScript. Properties and functions\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.\" \/>\n<meta name=\"twitter:creator\" content=\"@kamabzalov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kamil&#039; Abzalov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/\"},\"author\":{\"name\":\"Kamil' Abzalov\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"headline\":\"JavaScript. Properties and functions\",\"datePublished\":\"2017-08-09T16:56:37+00:00\",\"dateModified\":\"2020-06-14T20:16:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/\"},\"wordCount\":671,\"commentCount\":0,\"keywords\":[\"javascript\",\"js\"],\"articleSection\":[\"JavaScript\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/\",\"name\":\"JavaScript. Properties and functions - Kamil Abzalov's blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\"},\"datePublished\":\"2017-08-09T16:56:37+00:00\",\"dateModified\":\"2020-06-14T20:16:14+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"description\":\"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/tutorials\\\/javascript\\\/javascript-properties-and-functions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript. Properties and functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"name\":\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kamil-abzalov.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\",\"name\":\"Kamil' Abzalov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"caption\":\"Kamil' Abzalov\"},\"sameAs\":[\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/kamabzalov\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kamabzalov\",\"https:\\\/\\\/x.com\\\/kamabzalov\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/kamabzalov\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript. Properties and functions - Kamil Abzalov's blog","description":"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript. Properties and functions - Kamil Abzalov's blog","og_description":"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.","og_url":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/","og_site_name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","article_author":"https:\/\/www.facebook.com\/kamabzalov","article_published_time":"2017-08-09T16:56:37+00:00","article_modified_time":"2020-06-14T20:16:14+00:00","author":"Kamil' Abzalov","twitter_card":"summary_large_image","twitter_title":"JavaScript. Properties and functions","twitter_description":"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.","twitter_creator":"@kamabzalov","twitter_misc":{"Written by":"Kamil' Abzalov","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/#article","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/"},"author":{"name":"Kamil' Abzalov","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"headline":"JavaScript. Properties and functions","datePublished":"2017-08-09T16:56:37+00:00","dateModified":"2020-06-14T20:16:14+00:00","mainEntityOfPage":{"@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/"},"wordCount":671,"commentCount":0,"keywords":["javascript","js"],"articleSection":["JavaScript","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/","url":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/","name":"JavaScript. Properties and functions - Kamil Abzalov's blog","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/#website"},"datePublished":"2017-08-09T16:56:37+00:00","dateModified":"2020-06-14T20:16:14+00:00","author":{"@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"description":"In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks - functions.","breadcrumb":{"@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kamil-abzalov.com\/en\/tutorials\/javascript\/javascript-properties-and-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/kamil-abzalov.com\/en\/"},{"@type":"ListItem","position":2,"name":"JavaScript. Properties and functions"}]},{"@type":"WebSite","@id":"https:\/\/kamil-abzalov.com\/#website","url":"https:\/\/kamil-abzalov.com\/","name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kamil-abzalov.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600","name":"Kamil' Abzalov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","caption":"Kamil' Abzalov"},"sameAs":["https:\/\/kamil-abzalov.com\/","https:\/\/www.facebook.com\/kamabzalov","https:\/\/www.linkedin.com\/in\/kamabzalov","https:\/\/x.com\/kamabzalov","https:\/\/www.youtube.com\/user\/kamabzalov"]}]}},"_links":{"self":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/3322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/comments?post=3322"}],"version-history":[{"count":9,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/3322\/revisions"}],"predecessor-version":[{"id":31817,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/3322\/revisions\/31817"}],"wp:attachment":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/media?parent=3322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/categories?post=3322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/tags?post=3322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}