{"id":12768,"date":"2020-12-07T15:55:56","date_gmt":"2020-12-07T23:55:56","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12768"},"modified":"2023-12-01T04:05:42","modified_gmt":"2023-12-01T12:05:42","slug":"javascript-while-loop","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/","title":{"rendered":"A 2020 Guide to While Loop in JavaScript"},"content":{"rendered":"\n<p><em>do&#8230;while loops can be used to execute a block of code once and will keep running if a statement continues to evaluate to true. while and do&#8230;while loops are useful if you want to execute a block of code while a certain condition is met.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Loops are a core feature of programming and are used to automate similar tasks. For example, say you want to print out every name in a list of students. You could create a loop to automate the task.<\/p>\n\n\n\n<p>JavaScript offers two main types of loops which can be used to perform a repetitive task multiple times. The first type, known as a for loop, executes a statement a specific number of times. The second type is the while loop, which runs based on whether a condition evaluates to true.<\/p>\n\n\n\n<p>In this tutorial, we are going to discuss the basics of the <em>while<\/em> loop in JavaScript. We will explore the syntax for <em>while<\/em> loops, how to create <em>do&#8230;while loops,<\/em> and explore a few examples of these loops in action.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript While Loops<\/h2>\n\n\n\n<p>A JavaScript while loop executes a block of code while a condition evaluates to <em>true<\/em>. while loops stop executing when their condition evaluates to false. A while loop lets you repeat a block of code multiple times without copy-pasting your code.<\/p>\n\n\n\n<p><em>while<\/em> loops are often used if you want to run code for an unspecified number of times. On the other hand, <a href=\"https:\/\/careerkarma.com\/blog\/javascript-for-loop\/\">JavaScript for loops<\/a> are used if you already know or can calculate how many times your loop should execute.<\/p>\n\n\n\n<p>Here\u2019s the syntax for a <em>while<\/em> loop in JavaScript:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>while (condition_is_true) {\n   \/\/ Run code\n}\n<\/pre><\/div>\n\n\n\n<p>The <em>while<\/em> statement looks very similar to a JavaScript <em>for<\/em> statement.<\/p>\n\n\n\n<p>You can create an infinite loop by specifying a condition that will always evaluate to true. Make sure that your condition can evaluate to false unless you want your loop to continue until you manually stop your program.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JavaScript While Loop Example<\/h3>\n\n\n\n<p>Let\u2019s say that we are hosting an exclusive party. We only want to invite 40 people to our party at any given time.<\/p>\n\n\n\n<p>There are already 35 people at our party. Every time we invite someone we want to calculate how many more people we can invite before we reach the limit. Here\u2019s an example of a program that uses a <em>while<\/em> loop to perform this calculation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var limit = 40;\nvar current_attendees = 35;\nwhile (current_attendees &lt; limit) {\n   var current_attendees = current_attendees + 1;\n   var current_attendees = current_attendees + 1;\n   var spaces_left = limit - current_attendees;\n   console.log(`There are ${spaces_left} spaces left in the party.`);\n};\n<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>There are 4 spaces left in the party.\nThere are 3 spaces left in the party.\nThere are 2 spaces left in the party.\nThere are 1 spaces left in the party.\nThere are 0 spaces left in the party.<\/pre><\/div>\n\n\n\n<p>On the first two lines of our code, we declare two variables. The <em>limit<\/em> variable is used to specify the maximum number of people who can attend our party. The <em>current_attendees<\/em> <a href=\"https:\/\/careerkarma.com\/blog\/javascript-variables\/\">JavaScript variable<\/a> keeps track of how many people are currently attending the party.<\/p>\n\n\n\n<p>We create a <em>while<\/em> loop that executes as long as the number of current attendees is less than the limit we have set.<\/p>\n\n\n\n<p>Then, our program adds <em>1<\/em> to the number of current attendees, and calculates the number of spaces left by subtracting <em>current_attendees<\/em> from <em>limit.<\/em> Finally, our program prints out a statement to the console which tells our party leader how many spaces are left.<\/p>\n\n\n\n<p>Our <em>while<\/em> loop ran as long as there were under 40 people in our party. Each time the loop was executed our <em>current_attendees<\/em> increased by <em>1.<\/em> As soon as our party reached 40 attendees, our loop stopped running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">while Loops: Another Example<\/h3>\n\n\n\n<p>Let\u2019s use another example to illustrate the while loop in action. In the below example, we create a <em>while<\/em> loop which prints out every name in our array of party VIPs:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var vips = ['Robert De Niro', 'Will Smith', 'Brad Pitt', 'Denzel Washington'];\nvar counter = 0;\nwhile (counter &lt; vips.length) {\n   console.log(vips[counter]);\n   var counter = counter + 1;\n};\n<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Robert De Niro\nWill Smith\nBrad Pitt\nDenzel Washington<\/pre><\/div>\n\n\n\n<p>Our loop iterates through the <em>vips<\/em> array as long as our counter variable is less than the length of the <a href=\"https:\/\/careerkarma.com\/blog\/javascript-array\/\">JavaScript array<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript do\u2026while Loops<\/h2>\n\n\n\n<p>A JavaScript do&#8230;while loop executes a statement once and then it checks if a condition is true. If the condition is true, the loop will be executed again. Otherwise, the code stops running.<\/p>\n\n\n\n<p>There is one big difference between a while and a do&#8230;while loop. do&#8230;while loops execute at least once even if the condition they specify never evaluates to true. while loops, on the other hand, only execute if their condition evaluates to true.<\/p>\n\n\n\n<p>Here\u2019s the syntax for a <em>do&#8230;while<\/em> loop in JavaScript:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>do {\n   \/\/ Run code\n  } while (condition_is_true);\n<\/pre><\/div>\n\n\n\n<p>The code in our <em>do\u2026while<\/em> loop will always be executed at least once.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JavaScript do&#8230;while Loop Example<\/h3>\n\n\n\n<p>Let\u2019s use an example to illustrate how the <em>do&#8230;while<\/em> loop works. Let\u2019s say that we are creating a guessing game. We want our program to keep asking a user to guess a number until they guess the correct number.<\/p>\n\n\n\n<p>Here\u2019s an example program we could use to create this guessing game:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var number_to_guess = 7;\nvar guessed_number = 0;\ndo {\n   var input = prompt(&quot;Enter a number between 1 and 10.&quot;)\n   var input = prompt(&quot;Enter a number between 1 and 10.&quot;)\n   var guessed_number = parseInt(input);\n} while (guessed_number != number_to_guess);\n<\/pre><\/div>\n\n\n\n<p>Our program will ask the user to insert a number between 1 and 10 as long as <em>guessed_number<\/em> is not equal to <em>number_to_guess.<\/em> But our program will execute the contents of our <em>do<\/em> statement before it evaluates the conditions for the first time.<\/p>\n\n\n\n<p>When our condition is false, our loop will stop executing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>While loops can be used to execute a repetitive block of code while a statement evaluates to true. do&#8230;while loops can be used to execute a block of code once. They will keep running if a statement continues to evaluate to true.<\/p>\n\n\n\n<p>While and do&#8230;while loops are useful if you want to execute a block of code while a certain condition is met.<\/p>\n\n\n\n<p>In this tutorial, we discussed how to create a <em>while<\/em> and <em>do&#8230;while<\/em> loop in JavaScript. We also explored a few examples of these loops in action to illustrate where they may be useful. Now you\u2019re equipped with the information you need to use while loops like a JavaScript expert!<\/p>\n\n\n\n<p>For advice on top JavaScript learning resources and courses, check out our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-javascript\/\">How to Learn JavaScript article<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"do...while loops can be used to execute a block of code once and will keep running if a statement continues to evaluate to true. while and do...while loops are useful if you want to execute a block of code while a certain condition is met. Loops are a core feature of programming and are used&hellip;","protected":false},"author":240,"featured_media":12524,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-12768","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>A 2020 Guide to While Loop in JavaScript | Career Karma<\/title>\n<meta name=\"description\" content=\"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A 2020 Guide to While Loop in JavaScript\" \/>\n<meta property=\"og:description\" content=\"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-07T23:55:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:05:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"A 2020 Guide to While Loop in JavaScript\",\"datePublished\":\"2020-12-07T23:55:56+00:00\",\"dateModified\":\"2023-12-01T12:05:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\"},\"wordCount\":965,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\",\"name\":\"A 2020 Guide to While Loop in JavaScript | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg\",\"datePublished\":\"2020-12-07T23:55:56+00:00\",\"dateModified\":\"2023-12-01T12:05:42+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/careerkarma.com\/blog\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"A 2020 Guide to While Loop in JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A 2020 Guide to While Loop in JavaScript | Career Karma","description":"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.","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:\/\/careerkarma.com\/blog\/javascript-while-loop\/","og_locale":"en_US","og_type":"article","og_title":"A 2020 Guide to While Loop in JavaScript","og_description":"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-07T23:55:56+00:00","article_modified_time":"2023-12-01T12:05:42+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"A 2020 Guide to While Loop in JavaScript","datePublished":"2020-12-07T23:55:56+00:00","dateModified":"2023-12-01T12:05:42+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/"},"wordCount":965,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/","url":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/","name":"A 2020 Guide to While Loop in JavaScript | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg","datePublished":"2020-12-07T23:55:56+00:00","dateModified":"2023-12-01T12:05:42+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The JavaScript while and do while loops can be used by coders to perform repetitive actions while a condition evaluates to true. Learn how to use the JavaScript while and do while loops on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-while-loop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/coffee-writing-computer-blogging-34600.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-while-loop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"A 2020 Guide to While Loop in JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12768"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12768\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12524"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}