{"id":4294,"date":"2023-03-02T22:11:56","date_gmt":"2023-03-03T03:11:56","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=4294"},"modified":"2023-03-02T22:11:56","modified_gmt":"2023-03-03T03:11:56","slug":"5b","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/02\/5b\/","title":{"rendered":"5b"},"content":{"rendered":"<p>In our previous post, we went over what JavaScritp was, a type of programming language, and we went into slight detail as to what a variable was and how to either declare or initialize it. In this discussion, we are covering functions and their purpose. A function in JavaScript is &#8220;a set of statements that performs a task or calculates a value&#8221;. In order for it to be a true function it must take some input and produce some sort of output, and there must be some sort of relationship between both the inputs and the outputs. By calling function in JavaScript you are allowing an &#8220;object&#8221; to use a &#8220;method&#8221; that belongs to another object. In other words, it calls to apply a function to more than one object.\u00a0 Calling a function is also fairly straightforward. All you need to do is use the function name, followed by parentheses- call(). Below is an example. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-4303\" src=\"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/Screen-Shot-2023-03-02-at-10.11.31-PM-300x99.png\" alt=\"\" width=\"327\" height=\"108\" srcset=\"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/Screen-Shot-2023-03-02-at-10.11.31-PM-300x99.png 300w, https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/Screen-Shot-2023-03-02-at-10.11.31-PM-768x253.png 768w, https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/03\/Screen-Shot-2023-03-02-at-10.11.31-PM.png 960w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous post, we went over what JavaScritp was, a type of programming language, and we went into slight detail as to what a variable was and how to either declare or initialize it. In this discussion, we are covering functions and their purpose. A function in JavaScript is &#8220;a set of statements that [&hellip;]<\/p>\n","protected":false},"author":28888,"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":[663943],"tags":[],"class_list":{"0":"post-4294","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-instructor","7":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4294","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\/28888"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=4294"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4294\/revisions"}],"predecessor-version":[{"id":4304,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4294\/revisions\/4304"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=4294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=4294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=4294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}