{"id":4197,"date":"2023-03-02T20:47:27","date_gmt":"2023-03-03T01:47:27","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=4197"},"modified":"2023-03-02T20:47:27","modified_gmt":"2023-03-03T01:47:27","slug":"5b-functions","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/02\/5b-functions\/","title":{"rendered":"(5b) Functions"},"content":{"rendered":"<p>Hello class,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-4199\" src=\"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/DB-5a2-Function-pic-from-adobe-300x200.jpg\" alt=\"\" width=\"300\" height=\"200\" srcset=\"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/DB-5a2-Function-pic-from-adobe-300x200.jpg 300w, https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/DB-5a2-Function-pic-from-adobe-768x512.jpg 768w, https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/DB-5a2-Function-pic-from-adobe.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>JavaScript works with functions. Functions are defined as set of codes designed to perform a particular task when something invokes or calls it. Functions must be given a name followed by parentheses. Within these parentheses parameters may be included. functions arguments are these values received by the same function when it is called. However, functions can also be called when an event happens or automatically. Often, functions return a value after they are called. But I asked myself why are we using functions? Because functions can be used and reused as many times as needed. There is no need to rewrite codes when the same process has to be repeated we can just simply call the function to perform this process. Moreover, functions can shorten our codes because it is used as a variable value. Functions are very useful tools in designing programs or websites.<\/p>\n<p>&nbsp;<\/p>\n<p>(Image source: Adobe stock)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello class, JavaScript works with functions. Functions are defined as set of codes designed to perform a particular task when something invokes or calls it. Functions must be given a name followed by parentheses. Within these parentheses parameters may be included. functions arguments are these values received by the same function when it is called. [&hellip;]<\/p>\n","protected":false},"author":29240,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[10531],"tags":[],"class_list":{"0":"post-4197","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-student-post","7":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/users\/29240"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=4197"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4197\/revisions"}],"predecessor-version":[{"id":4202,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4197\/revisions\/4202"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=4197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=4197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=4197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}