{"id":107961,"date":"2022-02-16T21:31:00","date_gmt":"2022-02-16T21:31:00","guid":{"rendered":"https:\/\/codeinstitute.net\/global\/?p=107961"},"modified":"2023-10-23T11:35:00","modified_gmt":"2023-10-23T11:35:00","slug":"what-is-iteration-in-programming","status":"publish","type":"post","link":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/","title":{"rendered":"Understanding Iteration in Programming: A Comprehensive Guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In programming, the more you learn, the more you get confused. Not because of the complex topics, because no matter how complex certain topics are, you will probably get what they mean after a few practices. There are various concepts in programming, and some of their characteristics are pretty similar in function, so most tend to confuse one with another. One of such features is iteration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes. Now, let us delve deeper into the topic of iteration programming to understand them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-iteration\">What Is Iteration?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In programming, you will define several steps to accomplish specific tasks. In some instances, you will need to continue those steps for <a href=\"https:\/\/stackoverflow.com\/questions\/17723721\/executing-code-n-times-and-other-code-n1-times\" target=\"_blank\" rel=\"noreferrer noopener\">n times<\/a> until it meets a particular condition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what will you do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enter the same code again and again till the prerequisites are met (or)<\/li>\n\n\n\n<li>Will you input one code and let it repeat on its own till the conditions are met<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You probably will choose the second option because why would you lengthen your code by entering the same code multiple times.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This process in which the programmer enters a block of code and instructs the program to repeat the step several times till the specific condition is met is known as iteration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"difference-between-recursion-and-iteration\">Difference Between Recursion and Iteration&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is often confused with recursion. So let us give you a clear definition.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Recursion is also repeating code, but it calls the same <strong>function<\/strong> again until the necessary criteria are met.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>While iteration is used for much simpler purposes, we repeat the same <strong>block of code<\/strong> until the conditions are met.&nbsp;&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-loops-in-programming\">Types of Loops in Programming<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So how exactly is iteration implemented in a code?&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Through certain features, commonly known as &#8216;loops&#8217;. Every programming language has two different types of loops:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>for<\/em><\/strong> loop<\/li>\n\n\n\n<li><strong><em>while<\/em><\/strong> loop<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Another type of loop is called <strong><em>do while <\/em><\/strong>loop, but it is not used in every programming language and is quite similar to the <strong><em>while<\/em><\/strong> loop.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"for-loop\"><em>for<\/em> Loop<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>for <\/em><\/strong>loop is used to execute a certain block code n times till the condition is fulfilled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>for<\/em><\/strong> loop has the following syntax:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>for(initialization; condition; increment\/decrement)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>{<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ loop body<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>}<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here,&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>initialization<\/strong> is where you declare any variables used to initiate the procedure. Declaring the initialization value isn&#8217;t strictly necessary. (For example, i=1).<\/li>\n\n\n\n<li>The <strong>condition<\/strong> is in the middle, and it&#8217;s here that you&#8217;ll need to specify the variable&#8217;s condition. The block of code will get executed if the specified condition is <strong>&#8216;true.&#8217;<\/strong> If it&#8217;s a <strong>&#8216;false,&#8217;<\/strong> the loop is skipped, and the programme proceeds to the following statement.<\/li>\n\n\n\n<li>The control jumps to the <strong>increment\/decremen<\/strong>t portion when the loop&#8217;s body is executed. The variable is either increased or decremented here.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Following the increment or decrement operation, the control returns to the condition to determine whether or not the new variable is true. This approach is repeated until all of the criteria have been met.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"while-loop\"><em>while<\/em> Loop<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>while <\/em><\/strong>is used to execute a code block as long as the condition is true.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>while<\/em><\/strong> loop has the following syntax:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>initialization<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>while (condition)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>{<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ loop body<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ increment\/decrement<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>}<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>initialization<\/strong><strong><em> <\/em><\/strong>is declared before the loop.<\/li>\n\n\n\n<li>The variable is verified in the <strong>condition<\/strong>. If it&#8217;s a<strong> &#8216;true,&#8217;<\/strong> the loop body is executed; if it&#8217;s a <strong>&#8216;false,&#8217;<\/strong> control is passed to the following statement.<\/li>\n\n\n\n<li>The <strong>increment\/decrement <\/strong>is where the variable value is either incremented or decremented.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The operation runs until the provided criteria are met, similar to a loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"examples-of-iteration-in-programming\">Examples of Iteration in Programming<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now let&#8217;s look at some examples that can make you understand the concept more clearly:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-1\">Example 1:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>for<\/em><\/strong> loop will be used in the following example to print a statement n times.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;for (i = 1; i &lt;= 5; i++) {<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Iteration is an interesting concept\\n&#8221;);<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-2\">Example 2:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the following example, we will be employing the <strong><em>while<\/em><\/strong> loop to print the given statement n times.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;int i = 1;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;while (i &lt; 6) {<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Iteration is an interesting concept\\n&#8221;);<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i++;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Iteration is an interesting concept<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"wrapping-up\">Wrapping Up<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We hope this article helped you clear, relevant queries you had regarding iteration. If the concept of iterations is new to you, don&#8217;t let them scare you. As you get deeper into programming, these things become second nature. If you are new to programming, then try out the free <a href=\"https:\/\/codeinstitute.net\/global\/5-day-coding-challenge\/\" target=\"_blank\" rel=\"noreferrer noopener\">5 Day Coding Challenge<\/a>, where you can learn the basics of <a href=\"https:\/\/codeinstitute.net\/global\/blog\/what-is-html-and-why-should-i-learn-it\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTML<\/a>, <a href=\"https:\/\/codeinstitute.net\/global\/blog\/what-is-css-and-why-should-i-learn-it\/\" target=\"_blank\" rel=\"noreferrer noopener\">CSS <\/a>and <a href=\"https:\/\/codeinstitute.net\/global\/blog\/what-is-javascript-and-why-should-i-learn-it\/\" target=\"_blank\" rel=\"noreferrer noopener\">JavaScript<\/a>. It takes just one hour a day over five days. Register now through the form below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In programming, the more you learn, the more you get confused. Not because of the complex topics, because no matter how complex certain topics are, you will probably get what they mean after a few practices. There are various concepts in programming, and some of their characteristics are pretty similar in function, so most tend [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":107986,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[416,109],"class_list":["post-107961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","tag-learn-to-code","tag-technology"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global<\/title>\n<meta name=\"description\" content=\"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global\" \/>\n<meta property=\"og:description\" content=\"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Institute Global\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-16T21:31:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-23T11:35:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration-2.png.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Daragh \u00d3 Tuama\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration-2.png.webp\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daragh \u00d3 Tuama\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/\"},\"author\":{\"name\":\"Daragh \u00d3 Tuama\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#\\\/schema\\\/person\\\/061a77891417d29f74a8ac38dbf4f7ac\"},\"headline\":\"Understanding Iteration in Programming: A Comprehensive Guide\",\"datePublished\":\"2022-02-16T21:31:00+00:00\",\"dateModified\":\"2023-10-23T11:35:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/\"},\"wordCount\":883,\"publisher\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/What-is-iteration.png.webp\",\"keywords\":[\"Learn to Code\",\"Technology\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/\",\"url\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/\",\"name\":\"Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/What-is-iteration.png.webp\",\"datePublished\":\"2022-02-16T21:31:00+00:00\",\"dateModified\":\"2023-10-23T11:35:00+00:00\",\"description\":\"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#primaryimage\",\"url\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/What-is-iteration.png.webp\",\"contentUrl\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/What-is-iteration.png.webp\",\"width\":1500,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/what-is-iteration-in-programming\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding Iteration in Programming: A Comprehensive Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#website\",\"url\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/\",\"name\":\"Code Institute Global\",\"description\":\"A New Career in Tech\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#organization\",\"name\":\"Code Institute Global\",\"url\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Web_grey_logo-1.png.webp\",\"contentUrl\":\"https:\\\/\\\/d3m1rm8xuevz4q.cloudfront.net\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Web_grey_logo-1.png.webp\",\"width\":251,\"height\":105,\"caption\":\"Code Institute Global\"},\"image\":{\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/#\\\/schema\\\/person\\\/061a77891417d29f74a8ac38dbf4f7ac\",\"name\":\"Daragh \u00d3 Tuama\",\"description\":\"Daragh is Code Institute\u2019s Content Manager. With a long history in journalism, he has a huge interest in all things tech. Daragh also has a background in radio and TV, and has presented and contributed to shows on RT\u00c9, Newstalk, Today FM, TG4, and many more. He has a degree in modern Irish and history, and more recently, he has attained a certificate in sustainability studies. Daragh is also a videographer and is responsible for much of the content delivered to Code Institute. Daragh joined Code Institute in 2018.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/otuamadaragh\"],\"url\":\"https:\\\/\\\/codeinstitute.net\\\/global\\\/blog\\\/author\\\/daragh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global","description":"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/","og_locale":"en_US","og_type":"article","og_title":"Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global","og_description":"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.","og_url":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/","og_site_name":"Code Institute Global","article_published_time":"2022-02-16T21:31:00+00:00","article_modified_time":"2023-10-23T11:35:00+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration-2.png.webp","type":"image\/webp"}],"author":"Daragh \u00d3 Tuama","twitter_card":"summary_large_image","twitter_image":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration-2.png.webp","twitter_misc":{"Written by":"Daragh \u00d3 Tuama","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#article","isPartOf":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/"},"author":{"name":"Daragh \u00d3 Tuama","@id":"https:\/\/codeinstitute.net\/global\/#\/schema\/person\/061a77891417d29f74a8ac38dbf4f7ac"},"headline":"Understanding Iteration in Programming: A Comprehensive Guide","datePublished":"2022-02-16T21:31:00+00:00","dateModified":"2023-10-23T11:35:00+00:00","mainEntityOfPage":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/"},"wordCount":883,"publisher":{"@id":"https:\/\/codeinstitute.net\/global\/#organization"},"image":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration.png.webp","keywords":["Learn to Code","Technology"],"articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/","url":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/","name":"Understanding Iteration in Programming: A Comprehensive Guide - Code Institute Global","isPartOf":{"@id":"https:\/\/codeinstitute.net\/global\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#primaryimage"},"image":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration.png.webp","datePublished":"2022-02-16T21:31:00+00:00","dateModified":"2023-10-23T11:35:00+00:00","description":"Some people often confuse Iteration with recursion. Though their process may seem similar, both are used for entirely different purposes.","breadcrumb":{"@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#primaryimage","url":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration.png.webp","contentUrl":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/What-is-iteration.png.webp","width":1500,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/codeinstitute.net\/global\/blog\/what-is-iteration-in-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeinstitute.net\/global\/"},{"@type":"ListItem","position":2,"name":"Understanding Iteration in Programming: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/codeinstitute.net\/global\/#website","url":"https:\/\/codeinstitute.net\/global\/","name":"Code Institute Global","description":"A New Career in Tech","publisher":{"@id":"https:\/\/codeinstitute.net\/global\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeinstitute.net\/global\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeinstitute.net\/global\/#organization","name":"Code Institute Global","url":"https:\/\/codeinstitute.net\/global\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeinstitute.net\/global\/#\/schema\/logo\/image\/","url":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/Web_grey_logo-1.png.webp","contentUrl":"https:\/\/d3m1rm8xuevz4q.cloudfront.net\/wp-content\/uploads\/2022\/02\/Web_grey_logo-1.png.webp","width":251,"height":105,"caption":"Code Institute Global"},"image":{"@id":"https:\/\/codeinstitute.net\/global\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeinstitute.net\/global\/#\/schema\/person\/061a77891417d29f74a8ac38dbf4f7ac","name":"Daragh \u00d3 Tuama","description":"Daragh is Code Institute\u2019s Content Manager. With a long history in journalism, he has a huge interest in all things tech. Daragh also has a background in radio and TV, and has presented and contributed to shows on RT\u00c9, Newstalk, Today FM, TG4, and many more. He has a degree in modern Irish and history, and more recently, he has attained a certificate in sustainability studies. Daragh is also a videographer and is responsible for much of the content delivered to Code Institute. Daragh joined Code Institute in 2018.","sameAs":["https:\/\/www.linkedin.com\/in\/otuamadaragh"],"url":"https:\/\/codeinstitute.net\/global\/blog\/author\/daragh\/"}]}},"_links":{"self":[{"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/posts\/107961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/comments?post=107961"}],"version-history":[{"count":2,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/posts\/107961\/revisions"}],"predecessor-version":[{"id":149999,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/posts\/107961\/revisions\/149999"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/media\/107986"}],"wp:attachment":[{"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/media?parent=107961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/categories?post=107961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinstitute.net\/global\/wp-json\/wp\/v2\/tags?post=107961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}