{"id":13447,"date":"2020-12-20T18:29:02","date_gmt":"2020-12-21T02:29:02","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=13447"},"modified":"2023-12-01T04:06:17","modified_gmt":"2023-12-01T12:06:17","slug":"java-break","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/java-break\/","title":{"rendered":"Java break Statement: A How-To Guide"},"content":{"rendered":"\n<p><em>A Java break statement halts the execution of a loop. When a break statement is run, a program starts to run the code after a statement. If a break statement is used in a nested loop, only the innermost loop is terminated.<\/em><\/p>\n\n\n\n<p>Java <em>for<\/em> loops and <em>while<\/em> loops are used to automate similar tasks. When you\u2019re working with these loops, you may want to exit a loop when a particular condition is met. That\u2019s where the Java <em>break<\/em> statement comes in. The <em>break<\/em> statement is used to stop a loop completely.<\/p>\n\n\n\n<p>This tutorial will discuss using the <em>break<\/em> statement to control the flow of your loops in Java. We\u2019ll walk through an example of the break statement in a Java program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Java break Statement<\/h2>\n\n\n\n<p>The Java <em>break<\/em> statement halts the execution of a loop. The interpreter moves onto the next statement in a program after the loop. The <em>break<\/em> statement is useful if you want your loop to stop running if a certain condition is met in a loop.<\/p>\n\n\n\n<p>The syntax for the <em>break<\/em> statement is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>break;<\/pre><\/div>\n\n\n\n<p>The break statement stands alone as its own keyword. It does not accept any arguments because the break statement is not a function. When a break statement is encountered, the program skips the current iteration of the loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">break Java Example<\/h2>\n\n\n\n<p>Let\u2019s say we are creating a program that asks a user to guess a number between one and ten.<\/p>\n\n\n\n<p>If the user guesses the correct number, our program should print out a message congratulating the user on guessing the right number. Otherwise, our user should be allowed to guess again, up to a total of five guesses.<\/p>\n\n\n\n<p>Here\u2019s the code we could use to write this program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import java.util.Scanner;\n\nclass GuessingGame {\n\tpublic static void main(String[] args) {\n\t\tint number = 6;\n\t\tScanner input = new Scanner(System.in);\n\n\t\tfor (int i = 0; i &lt;= 5; i++) {\n\t\t\tSystem.out.print(&quot;Guess a number between 1 and 10: &quot;);\n\t\t\tguess = input.nextInt();\n\n\t\t\tif (guess == number) {\n\t\t\t\tSystem.out.println(&quot;You're correct!&quot;);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\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>Guess a number between 1 and 10: 1\nGuess a number between 1 and 10: 6\nYou're correct!\n<\/pre><\/div>\n\n\n\n<p>Our program asks us to guess again if we do not guess the correct number.<\/p>\n\n\n\n<p>If a user has already had five guesses, the program stops. But if a user guesses the correct number, our code prints &#8220;<em>You\u2019re correct!&#8221;<\/em> to the console.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Java break Example Breakdown<\/h3>\n\n\n\n<p>Let\u2019s break down our code. First, we import the java.util.Scanner library, which allows us to accept user input. We define a class called GuessingGame. Then our program does the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>We declare a <a href=\"https:\/\/careerkarma.com\/blog\/java-variables\/\">Java variable<\/a> called <em>number.<\/em> This variable stores the number the user should guess.<\/li><li>We use <em>Scanner input<\/em> to initialize our user input, so we can retrieve guesses from the user in our program.<\/li><li>We create a <a href=\"https:\/\/careerkarma.com\/blog\/java-for-each-loops\/\">Java <em>for<\/em> loop<\/a> which runs until <em>i<\/em> is greater than five. This for loop gives our user five attempts at guessing the correct number.<\/li><li>Our code prints &#8220;<em>Guess a number between 1 and 10: &#8220;<\/em> to the console.<\/li><li>We use <em>input.nextInt()<\/em> to accept the user&#8217;s guess. We store the guess in a new variable called <em>guess<\/em>.<\/li><li>Our program compares whether the user\u2019s guess is equal to the <em>number<\/em> variable, which stores the number our user should guess.<\/li><li>If <em>guess<\/em> is equal to <em>number<\/em>, the message <em>&#8220;You&#8217;re correct!&#8221;<\/em> is printed to the console. Then, the loop stops executing.<\/li><li>Otherwise, the <em>for<\/em> loop will execute until <em>i<\/em> is greater than 5.<\/li><\/ol>\n\n\n\n<p>The <em>break<\/em> statement terminates a <em>for<\/em> or <em>while<\/em> loop immediately after the <em>break<\/em> statement is executed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Java Nested break Statement<\/h2>\n\n\n\n<p>The <em>break<\/em> statement terminates the innermost loop in a Java program. Say you have a <em>while<\/em> loop within a <em>for<\/em> loop, for example, and the <em>break<\/em> statement is in the <em>while<\/em> loop. The only loop that will stop is the <em>while<\/em> loop.<\/p>\n\n\n\n<p>Here\u2019s an example to illustrate how this works:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for (int; expression; updateCounter) {\n\t\/\/ Code\n\twhile (true) {\n\t\t\/\/ Code\n\t\tif (condition_is_met) {\n\t\t\tbreak;\n\t\t}\n\t}\n}\n<\/pre><\/div>\n\n\n\n<p>First, we initialize a <em>for<\/em> loop. Then, we initialize a <a href=\"https:\/\/careerkarma.com\/blog\/while-loop-java\/\">Java <em>while<\/em> loop<\/a>. When our break statement runs, the <em>while<\/em> loop will stop executing. However, the <em>for<\/em> loop will keep executing until the program stops.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Java Labelled break Statement<\/h2>\n\n\n\n<p>You can assign a label to a label to a <em>break<\/em> statement and create a <em>labelled break<\/em>. These are used to terminate the labelled statement in a program, unlike unlabeled break statements that break the innermost loop. Here\u2019s the syntax for a labelled break:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>break label_name;\n\nFor instance, say we have the following nested loop:\n\nfor (int; expression; updateCounter) {\n\t\/\/ Code\n\tfor (int; expression; updateCounter) {\n\t\t\/\/ Code\n\t\twhile (true) {\n\t\tif (condition_is_met) {\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t}\n}\n<\/pre><\/div>\n\n\n\n<p>When our program meets a condition, we want our code to break and resume executing the first <em>for<\/em> loop. In other words, we want our program toterminate the inner loop. The outer loop should keep running.<\/p>\n\n\n\n<p>We could accomplish this by using a labelled break statement. Here\u2019s the code we would use to break out of our second <em>for<\/em> loop and the <em>while<\/em> loop:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for (int; expression; updateCounter) {\n\t\/\/ Code\n\ttop_break:\n\tfor (int; expression; updateCounter) {\n\t\t\/\/ Code\n\t\twhile (true) {\n\t\tif (condition_is_met) {\n\t\t\tbreak top_break;\n\t\t}\n\t\t}\n\t}\n}\n<\/pre><\/div>\n\n\n\n<p>As soon as the <em>break top_break<\/em> statement executes, the program terminates all loops until our cod executes the <em>top_break<\/em> statement. In this case, this means that the second <em>for<\/em> loop and the <em>while<\/em> loop are both terminated, and the program continues running.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The Java <em>break<\/em> statement terminates a loop. The labelled break statement is used to terminate a loop and jump to the statement corresponding to the labelled break.<\/p>\n\n\n\n<p>This tutorial discussed how to use the <em>break<\/em> and labelled break statements to control the flow of a program.<\/p>\n\n\n\n<p>Do you want to learn more about Java? Check out our complete <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-java\/\">How to Learn Java guide<\/a>. In this guide, you&#8217;ll find advice on top courses, books, and learning resources.<\/p>\n","protected":false},"excerpt":{"rendered":"A Java break statement halts the execution of a loop. When a break statement is run, a program starts to run the code after a statement. If a break statement is used in a nested loop, only the innermost loop is terminated. Java for loops and while loops are used to automate similar tasks. When&hellip;","protected":false},"author":240,"featured_media":13448,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17289],"tags":[],"class_list":{"0":"post-13447","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-java"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Java","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>Java break Statement: A How-To Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.\" \/>\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\/java-break\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java break Statement: A How-To Guide\" \/>\n<meta property=\"og:description\" content=\"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/java-break\/\" \/>\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-21T02:29:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:06:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Java break Statement: A How-To Guide\",\"datePublished\":\"2020-12-21T02:29:02+00:00\",\"dateModified\":\"2023-12-01T12:06:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/\"},\"wordCount\":870,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg\",\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/java-break\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/java-break\/\",\"name\":\"Java break Statement: A How-To Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg\",\"datePublished\":\"2020-12-21T02:29:02+00:00\",\"dateModified\":\"2023-12-01T12:06:17+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/java-break\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/java-break\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\/\/careerkarma.com\/blog\/java\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Java break Statement: A How-To Guide\"}]},{\"@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":"Java break Statement: A How-To Guide | Career Karma","description":"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.","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\/java-break\/","og_locale":"en_US","og_type":"article","og_title":"Java break Statement: A How-To Guide","og_description":"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.","og_url":"https:\/\/careerkarma.com\/blog\/java-break\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-21T02:29:02+00:00","article_modified_time":"2023-12-01T12:06:17+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/java-break\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Java break Statement: A How-To Guide","datePublished":"2020-12-21T02:29:02+00:00","dateModified":"2023-12-01T12:06:17+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/"},"wordCount":870,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg","articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/java-break\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/java-break\/","url":"https:\/\/careerkarma.com\/blog\/java-break\/","name":"Java break Statement: A How-To Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg","datePublished":"2020-12-21T02:29:02+00:00","dateModified":"2023-12-01T12:06:17+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Java break statement is used by coders to terminate a loop. Learn how to use break statements and labelled break statements in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/java-break\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/java-break\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/java-break\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/blur-computer-connection-electronics-442150.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/java-break\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/careerkarma.com\/blog\/java\/"},{"@type":"ListItem","position":3,"name":"Java break Statement: A How-To Guide"}]},{"@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\/13447","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=13447"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/13447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/13448"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=13447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=13447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=13447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}