{"id":4050,"date":"2023-03-02T18:38:29","date_gmt":"2023-03-02T23:38:29","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=4050"},"modified":"2023-03-02T18:38:29","modified_gmt":"2023-03-02T23:38:29","slug":"5b-post-functions-in-javascript","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/02\/5b-post-functions-in-javascript\/","title":{"rendered":"5b Post (Functions in Javascript)"},"content":{"rendered":"<p>A function in Javascript is a block of code that performs a specific task (programiz.com) You can create a function to do tasks such as adding, subtracting, etc. or color a draw a shape. Creating functions make your program easy to understand. When creating a function, you must use a syntax to declare that function. The function is declared using the keyword [function]. And when creating a name for the function, it should be descriptive. A function is written using { }. To use a function, you have to call it. When using a function return, you can return the value to a function call. \u00a0Returning statement indicates that the function has ended. There are benefits of using functions. When you create a function, you can reuse it as needed. Functions makes your programs easier due to each task being broken down, and easier to read (programiz.com).<\/p>\n<p>&nbsp;<\/p>\n<p><em>JavaScript function and function expressions<\/em>. Programiz. (n.d.). Retrieved March 2, 2023, from https:\/\/www.programiz.com\/javascript\/function#:~:text=A%20function%20is%20declared%20using,the%20function%20add%20or%20addNumbers%20.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A function in Javascript is a block of code that performs a specific task (programiz.com) You can create a function to do tasks such as adding, subtracting, etc. or color a draw a shape. Creating functions make your program easy to understand. When creating a function, you must use a syntax to declare that function. [&hellip;]<\/p>\n","protected":false},"author":29250,"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":[845092,845149,178,16],"class_list":{"0":"post-4050","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-student-post","7":"tag-functions","8":"tag-javascipt","9":"tag-mis","10":"tag-programs","11":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4050","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\/29250"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=4050"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4050\/revisions"}],"predecessor-version":[{"id":4051,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/4050\/revisions\/4051"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=4050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=4050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=4050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}