{"id":13216,"date":"2020-07-24T22:15:49","date_gmt":"2020-07-25T05:15:49","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=13216"},"modified":"2023-12-01T03:56:06","modified_gmt":"2023-12-01T11:56:06","slug":"javascript-shift-unshift","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/","title":{"rendered":"JavaScript Shift and JavaScript Unshift: A Complete Guide"},"content":{"rendered":"\n<p><em>JavaScript shift() removes an element at a specified position and shifts the remaining elements up. The JavaScript unshift() function does the opposite. unshift() adds a new element at a particular position and shifts the remaining elements down the list.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>You may decide that you want to add or remove an item at the start of a list. Let&#8217;s say you make a list of top salespeople. You would want to insert the number-one top seller at the start of the list.<\/p>\n\n\n\n<p>That\u2019s where the JavaScript <em>shift()<\/em> and <em>unshift()<\/em> functions come in. <em>shift()<\/em> and <em>unshift()<\/em> are used to remove and add items to the start of a list, respectively. These functions are similar to the push() function and <em>pop()<\/em> function, although <em>shift()<\/em> and <em>unshift()<\/em> only support removing and adding items to the start of a list.<\/p>\n\n\n\n<p>This tutorial will explore how to use <em>shift()<\/em> and <em>unshift()<\/em> to remove and add items to the start of an array. In addition, we\u2019ll walk through an example of each of these functions in a JavaScript program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript shift<\/h2>\n\n\n\n<p><em>shift()<\/em> is a built-in JavaScript function that removes the first element from an array. The <em>shift()<\/em> function directly modifies the <a href=\"https:\/\/careerkarma.com\/blog\/javascript-array\/\">JavaScript array<\/a> with which you are working. shift() returns the item you have removed from the array.<\/p>\n\n\n\n<p>The <em>shift()<\/em> function removes the item at <a href=\"https:\/\/careerkarma.com\/blog\/javascript-indexof\/\">index position 0<\/a> and shifts the values at future index numbers down by one. If you are struggling to remember the purpose of the <em>shift()<\/em> function, tell yourself this:<\/p>\n\n\n\n<p><em>shift()<\/em> <em><strong>shifts<\/strong><\/em> <em>the index values in an array down by one.<\/em><\/p>\n\n\n\n<p><em>shift()<\/em> returns <em>undefined<\/em> if you use the <em>shift()<\/em> function on an empty list.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the JavaScript <em>shift()<\/em> function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>array_name.shift()<\/pre><\/div>\n\n\n\n<p>The JavaScript array <em>shift()<\/em> function takes in no parameters. This is because shift() only performs one function. shift() removes an item from the end of an array. If shift() let you remove an item from any position, a parameter would be needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Shift JavaScript Example<\/h3>\n\n\n\n<p>Let\u2019s walk through an example to explain how the <em>shift()<\/em> method works.<\/p>\n\n\n\n<p>Suppose you are the manager of a pharmaceutical sales team. You want to compose a list of this month&#8217;s top salespeople. To start with, you have a list of last month&#8217;s top salespeople. You want to remove Mark from the start of the list. Mark did not make the list last month because he was on vacation for two weeks.<\/p>\n\n\n\n<p>We could use the <em>shift()<\/em> function to remove Mark\u2019s name to the start of the list. Here\u2019s an example of <em>shift()<\/em> being used to add Heather to the start of the top salespeople list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let top_salespeople = ['Mark', 'Lucy', 'Graham', 'Carol', 'Ann'];\ntop_salespeople.shift();\n\nconsole.log(top_salespeople);<\/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>['Lucy', 'Graham', 'Carol', 'Ann']<\/pre><\/div>\n\n\n\n<p>Let\u2019s explain what is happening in our code. On the first line, we declare an array called \u201c<em>top_salespeople<\/em>\u201d which stores the top salespeople in the pharmaceutical sales team. Then, we use the <em>shift()<\/em> function to remove the first value from the list. Finally, we use <em>console.log()<\/em> to print to the console the revised list.<\/p>\n\n\n\n<p>As you can see, the <em>shift()<\/em> function removed Mark from the list, who appeared in the first position.<\/p>\n\n\n\n<p>The <em>top_salespeople<\/em> <a href=\"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/\">array no longer contains<\/a> Mark. This is because the <em>shift()<\/em> function changes the original array. It does not create a new array with the modifications we have made.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript unshift<\/h2>\n\n\n\n<p>The JavaScript array <em>unshift()<\/em> function adds one or more elements to the start of an array. The <em>unshift()<\/em> function changes the array and returns the length of the new array.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the <em>unshift()<\/em> function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>array_name.unshift(item_one, item_two, \u2026)<\/pre><\/div>\n\n\n\n<p>The <em>unshift()<\/em> function takes in as many parameters as you specify. These parameters will all be added to the start of the array.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unshift JavaScript Example<\/h3>\n\n\n\n<p>Let\u2019s walk through an example and discuss how the <em>unshift()<\/em> function works.<\/p>\n\n\n\n<p>An employee called Hannah had an amazing month on our sales team. She advanced to 1st position on the top salespeople list. We want to add Hannah to the 1st position in our <em>top_salespeople<\/em> array. We could use the following code to accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let top_salespeople = ['Lucy', 'Graham', 'Carol', 'Ann'];\ntop_salespeople.unshift('Hannah');\n\nconsole.log(top_salespeople);<\/pre><\/div>\n\n\n\n<p>When we run our code, the following response is returned to the console:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Hannah', 'Lucy', 'Graham', 'Carol', 'Ann']<\/pre><\/div>\n\n\n\n<p>As you can see, Hannah\u2019s name was added to the start of our list. The <em>unshift()<\/em> function works in the same way as the <em>shift()<\/em> function but with two differences: <em>unshift()<\/em> adds an item to the start of a list, and accepts that item as a parameter.<\/p>\n\n\n\n<p>Our sales team has been expanding. Two of our new employees have managed to advance to the top of the sales team in terms of sales in only one month. We want to add these employees to our <em>top_salespeople<\/em> list. Geoff should appear at the start of the list, and Peter should appear second.<\/p>\n\n\n\n<p>This code updates the list of top salespeople:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let top_salespeople = ['Hannah', 'Lucy', 'Graham', 'Carol', 'Ann'];\ntop_salespeople.unshift('Geoff', 'Peter');\n\nconsole.log(top_salespeople);<\/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>['Geoff', 'Peter', 'Hannah', 'Lucy', 'Graham', 'Carol', 'Ann']<\/pre><\/div>\n\n\n\n<p>This second example code works in the same way as our first example. There is one difference. In the second example, we have specified two parameters in the <em>unshift()<\/em> function instead of one.<\/p>\n\n\n\n<p>As you can see, these parameters have been added to the start of our list in the order we specified. Geoff appears first and Peter appears second.<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/repl.it\/@careerkarma\/JavaScript-Shift-and-Unshift?lite=true\" width=\"100%\" height=\"400px\" frameborder=\"0\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The <em>shift()<\/em> function lets you remove an item from the start of an array. The the <em>unshift()<\/em> function adds one or more items to the start of an array.<\/p>\n\n\n\n<p>This tutorial discussed how to use both the <em>shift()<\/em> and <em>unshift()<\/em> functions to manipulate arrays in JavaScript. We walked through JavaScript exercises for each of these functions in action.<\/p>\n","protected":false},"excerpt":{"rendered":"JavaScript shift() removes an element at a specified position and shifts the remaining elements up. The JavaScript unshift() function does the opposite. unshift() adds a new element at a particular position and shifts the remaining elements down the list. You may decide that you want to add or remove an item at the start of&hellip;","protected":false},"author":240,"featured_media":13219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-13216","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>JavaScript Shift and JavaScript Unshift | Career Karma<\/title>\n<meta name=\"description\" content=\"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more 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\/javascript-shift-unshift\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Shift and JavaScript Unshift: A Complete Guide\" \/>\n<meta property=\"og:description\" content=\"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\" \/>\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-07-25T05:15:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:56:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.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-shift-unshift\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"JavaScript Shift and JavaScript Unshift: A Complete Guide\",\"datePublished\":\"2020-07-25T05:15:49+00:00\",\"dateModified\":\"2023-12-01T11:56:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\"},\"wordCount\":926,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\",\"name\":\"JavaScript Shift and JavaScript Unshift | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg\",\"datePublished\":\"2020-07-25T05:15:49+00:00\",\"dateModified\":\"2023-12-01T11:56:06+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg\",\"width\":1020,\"height\":681,\"caption\":\"JavaScript Shift and Unshift\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#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\":\"JavaScript Shift and JavaScript Unshift: A Complete 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":"JavaScript Shift and JavaScript Unshift | Career Karma","description":"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more 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\/javascript-shift-unshift\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Shift and JavaScript Unshift: A Complete Guide","og_description":"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more in this article.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-25T05:15:49+00:00","article_modified_time":"2023-12-01T11:56:06+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.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-shift-unshift\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"JavaScript Shift and JavaScript Unshift: A Complete Guide","datePublished":"2020-07-25T05:15:49+00:00","dateModified":"2023-12-01T11:56:06+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/"},"wordCount":926,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/","url":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/","name":"JavaScript Shift and JavaScript Unshift | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg","datePublished":"2020-07-25T05:15:49+00:00","dateModified":"2023-12-01T11:56:06+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"We use JavaScript shift and unshift methods to remove and add items to the start of a list. Learn more in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-people-holding-macbook-pro-1181275.jpg","width":1020,"height":681,"caption":"JavaScript Shift and Unshift"},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-shift-unshift\/#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":"JavaScript Shift and JavaScript Unshift: A Complete 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\/13216","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=13216"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/13216\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/13219"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=13216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=13216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=13216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}