{"id":3995,"date":"2023-03-02T17:50:52","date_gmt":"2023-03-02T22:50:52","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=3995"},"modified":"2023-03-02T17:51:02","modified_gmt":"2023-03-02T22:51:02","slug":"6b-why-do-we-use-loops","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/02\/6b-why-do-we-use-loops\/","title":{"rendered":"(6B) Why do we use loops??"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Loops are generally used as the key fundamentals for allowing a code to repeat. These loops can happen so many times until it is told to stop. Java script has many different types of loops but I can name a few. First, you have a \u201cfor\u201d loop which comes in 3 sections such as initialization, condition and increment. Initialization is the part where you put your counter variable. The condition section is the part where you define the conditions you are putting for your variable. Lastly, the increment is used for the loop&#8217;s updates. In other words, you can use increment for updating the counter variable towards the end of each loop that occurs. Another loop is the \u201cwhile\u201d loop. This loop happens to be simpler than the \u201cfor\u201d loop is. For this, you would need to put the condition of the variable. This is the same if either it is true or false.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Loops are generally used as the key fundamentals for allowing a code to repeat. These loops can happen so many times until it is told to stop. Java script has many different types of loops but I can name a few. First, you have a \u201cfor\u201d loop which comes in 3 sections such as initialization, [&hellip;]<\/p>\n","protected":false},"author":29174,"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,10531,1],"tags":[],"class_list":{"0":"post-3995","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-instructor","7":"category-student-post","8":"category-uncategorized","9":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3995","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\/29174"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=3995"}],"version-history":[{"count":2,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3995\/revisions"}],"predecessor-version":[{"id":3998,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3995\/revisions\/3998"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=3995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=3995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=3995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}