{"id":20581,"date":"2020-12-17T23:40:10","date_gmt":"2020-12-18T07:40:10","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20581"},"modified":"2023-12-01T04:06:15","modified_gmt":"2023-12-01T12:06:15","slug":"javascript-addition-assignment","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/","title":{"rendered":"How to Use the JavaScript += Operator"},"content":{"rendered":"\n<p><em>The JavaScript += operator adds two values together and assigns the result to a variable. This operator is called the addition assignment operator. It is more convenient than the regular variable = X + Y syntax.<\/em><\/p>\n\n\n\n<p>A plus sign and an equals sign together? Is that a typo? In JavaScript, a plus and an equals sign side-by-side has its own meaning. It is the JavaScript addition assignment operator.<\/p>\n\n\n\n<p>In this tutorial, we\u2019re going to talk about what the JavaScript += operator is and how it works. We\u2019ll walk through an example of this operator in action to help you learn how to use it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the JavaScript += Operator?<\/h2>\n\n\n\n<p>The JavaScript += operator adds the value on the right of the operator to the variable on the left. The resultant value is then assigned to the variable on the left. This operator is called the addition assignment operator.<\/p>\n\n\n\n<p>Let&#8217;s take a look at the syntax for this operator:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let welcome = &quot;Hello there, &quot;;\n\nconsole.log(welcome += &quot;Sophie.&quot;);<\/pre><\/div>\n\n\n\n<p>We have declared a <a href=\"https:\/\/careerkarma.com\/blog\/javascript-variables\/\">JavaScript variable<\/a> called &#8220;welcome&#8221; whose value is &#8220;Hello there, &#8220;. Then, we have added &#8220;Sophie. to this value. The addition assignment operator adds these two values and then assigns the result to the &#8220;welcome&#8221; variable.<\/p>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Hello there, Sophie. <\/pre><\/div>\n\n\n\n<p>This operator has two uses. It is used to add two numbers together. It is also used to add the values of two strings together.<\/p>\n\n\n\n<p>The assignment operator is another way of saying:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>x = x + y<\/pre><\/div>\n\n\n\n<p>The addition assignment operator is a way to make your code easier to read. A += sign is much clearer than writing &#8220;variable = x + y&#8221; to add two values and assign the result to a variable.<\/p>\n\n\n\n<p>You will often see the addition assignment operator in loops with a counter that tracks how many times the loop has executed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript += Operator: Adding Numbers<\/h2>\n\n\n\n<p>The addition assignment operator allows you to add two numbers together. Let\u2019s create a program which counts how many times \u201cThe Count of Monte Cristo\u201d appears in a list. This list contains the results of a book club\u2019s \u201cBook of the Year\u201d poll.<\/p>\n\n\n\n<p>We\u2019ll start by defining a <a href=\"https:\/\/careerkarma.com\/blog\/javascript-array\/\">JavaScript array<\/a> containing the names of books. We shall also declare a variable to track how many times the book for which we are searching appears:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var books = [&quot;The Count of Monte Cristo&quot;, &quot;All My Sons&quot;, &quot;Of Mice and Men&quot;, &quot;The Count of Monte Cristo&quot;, &quot;To Have and Have Not&quot;];\nvar count = 0;<\/pre><\/div>\n\n\n\n<p>Next, we\u2019ll write a <a href=\"https:\/\/careerkarma.com\/blog\/javascript-for-loop\/\">JavaScript for loop<\/a> which loops through this list and counts how many times \u201cThe Count of Monte Cristo\u201d appears:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for (b in books) {\n\tif (books[b] === &quot;The Count of Monte Cristo&quot;) {\n\t\tcount += 1\n\t}\n}\n\nconsole.log(`The Count of Monte Cristo was voted Book of the Year ${count} times.`);<\/pre><\/div>\n\n\n\n<p>This for loop iterates through the \u201cbooks\u201d list. For each book in the list, our program checks if the title is equal to \u201cThe Count of Monte Cristo\u201d. If it is, we use the addition assignment operator to increment the value of \u201ccount\u201d by 1. Otherwise, nothing happens.<\/p>\n\n\n\n<p>Once our loop has run, our program prints out how many times the book has appeared in our list. Let\u2019s try out our code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The Count of Monte Cristo was voted Book of the Year 2 times.<\/pre><\/div>\n\n\n\n<p>Our code has counted how many times the book appears in the list.<\/p>\n\n\n\n<p>Our code has counted how many times the book appears in the list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">+= Operator JavaScript: Strings<\/h2>\n\n\n\n<p>The JavaScript += operator can merge two strings together. This operator is more convenient than the long-form &#8220;variable = x + y&#8221; syntax.<\/p>\n\n\n\n<p>For instance, say you have a user&#8217;s forename and the surname in two strings. You could use the += operator to merge these values into one string.<\/p>\n\n\n\n<p>Let\u2019s create a program that checks for any cake that begins with \u201cB\u201d in a list. If that cake begins with a \u201cB\u201d, it should be added to a new string. Otherwise, nothing should happen.<\/p>\n\n\n\n<p>We\u2019ll start by defining a list and a string:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var cakes = [&quot;Babka&quot;, &quot;Raspberry Ganache&quot;, &quot;Strawberry Cheesecake&quot;, &quot;Baked Alaska&quot;];\nvar start_with_b = &quot;| &quot;;<\/pre><\/div>\n\n\n\n<p>The variable \u201cstart_with_b\u201d will contain all the cakes that start with \u201cB\u201d. Initially, its value is \u201c| \u201d.<\/p>\n\n\n\n<p>Next, we\u2019ll create a for loop to iterate through every cake and check if each cake starts with \u201cB\u201d:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for (cake in cakes) {\n\tif (cakes[cake].startsWith(&quot;B&quot;)) {\n\t\tvar message = cakes[cake] + &quot; | &quot;;\n\t\tstart_with_b += message\n\t}\n}\n\nconsole.log(start_with_b);<\/pre><\/div>\n\n\n\n<p>We use the <a href=\"https:\/\/careerkarma.com\/blog\/javascript-startswith-endswith\/\">JavaScript startsWith()<\/a> method to check if each cake in our list starts with \u201cB\u201d.<\/p>\n\n\n\n<p>If a cake starts with \u201cB\u201d, our if statement runs. Inside the if statement we declare a variable called \u201cmessage\u201d. This adds \u201c | \u201d to the end of every cake name. We do this so that they will appear separately in our string.<\/p>\n\n\n\n<p>Next, we use the assignment operator to add the contents of \u201cmessage\u201d to the end of the \u201cstart_with_b\u201d variable.<\/p>\n\n\n\n<p>Let\u2019s run our code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>| Babka | Baked Alaska | <\/pre><\/div>\n\n\n\n<p>Our code returns a list of all cakes that begin with \u201cB\u201d.<\/p>\n\n\n\n<p>The alternative to merge two strings is to use the concatenation operator or the concat() method. To learn more about these methods, check out our <a href=\"https:\/\/careerkarma.com\/blog\/javascript-concat-string\/\">JavaScript string concatenation guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The addition assignment (+=) operator adds a value to another value and assigns the resultant value to a variable. It is often used to add values to the end of a string or to add numerical values together.<\/p>\n\n\n\n<p>Do you want to learn more about JavaScript? Check out our complete <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-javascript\/\">How to Learn JavaScript guide<\/a> for expert learning tips and guidance on top online books and courses.<\/p>\n","protected":false},"excerpt":{"rendered":"The JavaScript += operator adds two values together and assigns the result to a variable. This operator is called the addition assignment operator. It is more convenient than the regular variable = X + Y syntax. A plus sign and an equals sign together? Is that a typo? In JavaScript, a plus and an equals&hellip;","protected":false},"author":240,"featured_media":20582,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-20581","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.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use the JavaScript += Operator | Career Karma<\/title>\n<meta name=\"description\" content=\"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.\" \/>\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-addition-assignment\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the JavaScript += Operator\" \/>\n<meta property=\"og:description\" content=\"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/\" \/>\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-18T07:40:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:06:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\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\\\/javascript-addition-assignment\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"How to Use the JavaScript += Operator\",\"datePublished\":\"2020-12-18T07:40:10+00:00\",\"dateModified\":\"2023-12-01T12:06:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/\"},\"wordCount\":822,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/\",\"name\":\"How to Use the JavaScript += Operator | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg\",\"datePublished\":\"2020-12-18T07:40:10+00:00\",\"dateModified\":\"2023-12-01T12:06:15+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg\",\"width\":1020,\"height\":681},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-addition-assignment\\\/#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\":\"How to Use the JavaScript += Operator\"}]},{\"@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\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"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":"How to Use the JavaScript += Operator | Career Karma","description":"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.","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-addition-assignment\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the JavaScript += Operator","og_description":"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-18T07:40:10+00:00","article_modified_time":"2023-12-01T12:06:15+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.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\/javascript-addition-assignment\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"How to Use the JavaScript += Operator","datePublished":"2020-12-18T07:40:10+00:00","dateModified":"2023-12-01T12:06:15+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/"},"wordCount":822,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/","url":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/","name":"How to Use the JavaScript += Operator | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg","datePublished":"2020-12-18T07:40:10+00:00","dateModified":"2023-12-01T12:06:15+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The JavaScript += operator adds a value to another value and then assigns the result to a variable. On Career Karma, learn how to use the += operator.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/cytonn-photography-ZJEKICY5EXY-unsplash.jpg","width":1020,"height":681},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-addition-assignment\/#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":"How to Use the JavaScript += Operator"}]},{"@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\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","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\/20581","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=20581"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/20582"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}