{"id":2606,"date":"2022-06-14T17:42:48","date_gmt":"2022-06-14T21:42:48","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/?p=2606"},"modified":"2022-06-14T17:42:48","modified_gmt":"2022-06-14T21:42:48","slug":"functions-if-else-statements-js","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/2022\/06\/14\/functions-if-else-statements-js\/","title":{"rendered":"Functions, If\/Else Statements (JS)"},"content":{"rendered":"<p>A function in Javascript is like a procedure or a set of statements that preform a task or calculate a value. For a procedure to qualify as a function, it must take an input and return an output and there should be an obvious relationship between the input and the output. The JS\u00a0<strong>call()<\/strong> method is used to apply the same function to more than one object. It is used to make a method or function that is already assigned to a specific object be invoked for another object as well. We can also use If\/Else statements to execute a block of code if a specified condition is true. If the condition is false, then an alternative block of code is executed. The\u00a0<strong>isNaN()<\/strong> function is used to determine wether a given value is an illegal number. It returns true of the given value is a NaN, otherwise it returns false.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A function in Javascript is like a procedure or a set of statements that preform a task or calculate a value. For a procedure to qualify as a function, it must take an input and return an output and there should be an obvious relationship between the input and the output. The JS\u00a0call() method is [&hellip;]<\/p>\n","protected":false},"author":27011,"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-2606","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\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/users\/27011"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/comments?post=2606"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2606\/revisions"}],"predecessor-version":[{"id":2611,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2606\/revisions\/2611"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/media?parent=2606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/categories?post=2606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/tags?post=2606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}