{"id":12567,"date":"2020-12-22T13:55:36","date_gmt":"2020-12-22T21:55:36","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12567"},"modified":"2023-12-01T04:06:22","modified_gmt":"2023-12-01T12:06:22","slug":"javascript-array-contains","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/","title":{"rendered":"JavaScript Array Contains: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The JavaScript includes() method searches an array for an item. This method returns True if the element in the array exists. The filter() method lets you find an item in a list. Unlike includes(), the filter() method returns the item for which you have been searching.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>You may want to find out whether that array contains a particular value. For example, you may have a list of product orders and want to check if anyone has ordered a bedside cabinet from your store.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript Array Contains<\/h2>\n\n\n\n<p>There are two ways to determine if a <a href=\"https:\/\/careerkarma.com\/blog\/javascript-array\/\">JavaScript array<\/a> contains an item:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>includes().<\/li><li>filter().<\/li><\/ul>\n\n\n\n<p>The includes() method checks whether an item exists in array and returns true or false. filter() finds an item in an array and returns that item.<\/p>\n\n\n\n<p>In this tutorial, we are going to discuss using the array <em>includes()<\/em> method in JavaScript to determine whether an array contains a particular element. We will also discuss how to use <em>filter()<\/em> to check if an array of objects contains a value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Array Contains JavaScript: includes()<\/h2>\n\n\n\n<p>The JavaScript <em>includes()<\/em> method determines whether an array contains a particular value. The <em>includes()<\/em> method returns <em>true<\/em> if the specified item is found and <em>false<\/em> if the specified item <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>array_name.includes(element, start_position);<\/pre><\/div>\n\n\n\n<p>The <em>includes()<\/em> method accepts two arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>element: The value for which we are searching. (required)<\/li><li>start_position: The index position in the array at which the search should begin. (optional)<\/li><\/ul>\n\n\n\n<p>The includes() method can return one of two values: true and false. These values are called <a href=\"https:\/\/careerkarma.com\/blog\/javascript-boolean\/\">JavaScript Booleans<\/a>.<\/p>\n\n\n\n<p><em>Array.includes()<\/em> works in the same way as <em>String.includes(). <\/em>But, <em>Array.includes()<\/em> searches through an array of objects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">includes() JavaScript Example<\/h3>\n\n\n\n<p>Say that we are running a coffee shop. We want to check whether anyone has ordered any espressos today. We could use the following code to check today\u2019s order list to see if an order for an espresso has been placed:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var todays_orders = ['Latte', 'Americano', 'Latte', 'Latte', 'Mocha', 'Cortado'];\nconsole.log(todays_orders.includes('Espresso'));<\/pre><\/div>\n\n\n\n<p>Our code returns: false.<\/p>\n\n\n\n<p>The array <em>todays_orders<\/em> does not include the value <em>Espresso<\/em>. So, when our <em>includes()<\/em> function is executed, it returns the value <em>false<\/em>. If we were to search through an array where the element did exist, <em>includes()<\/em> would return <em>true<\/em>.<em>\n\n<\/em><\/p>\n\n\n\n<p>Now, let\u2019s say that we want to see whether anyone has ordered a latte in the last three orders that have been placed. We could use the <em>includes()<\/em> method with a <em>start_position<\/em> argument to do so.<\/p>\n\n\n\n<p>Here\u2019s the code we would use:\n<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var todays_orders = ['Latte', 'Americano', 'Latte', 'Latte', 'Mocha', 'Cortado'];\nconsole.log(todays_orders.includes('Latte', 3));<\/pre><\/div>\n\n\n\n<p>Our program returns: true. Because a latte was ordered after the index value <em>3<\/em> in our array, our <em>includes()<\/em> function has returned a <em>true<\/em> value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Array Contains JavaScript: filter()<\/h2>\n\n\n\n<p>In the above example, we used <em>includes()<\/em> to check if an array of strings included a particular value. But what if we want to check if an array of objects contains a specific value? We can use the <em>filter()<\/em> function to perform that action.&nbsp;<\/p>\n\n\n\n<p>The <em>filter()<\/em> function iterates through an array of objects and search for a particular value. <em>filter()<\/em> takes in one argument: a function that is used to search for a value. Here\u2019s the syntax of the JavaScript <em>filter()<\/em> function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var filterArray = array_name.filter(function(item) {\n\treturn item;\n});<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">filter() JavaScript Example<\/h3>\n\n\n\n<p>We have an array of coffee shop order objects that contain both the name of the coffee ordered and the customer\u2019s name.<\/p>\n\n\n\n<p>We want to check whether anyone by the name of <em>John Appleseed<\/em> ordered a coffee today. John is a loyalty customer and was supposed to get a discount on his next coffee.\n\n<\/p>\n\n\n\n<p>The following code checks if John Appleseed has placed an order:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var orders = [\n{ drink: 'Cappuccino', name: 'John Appleseed' }, \n{ drink: 'Espresso', name: 'Mya Stuart' },\n{ drink: 'Cappuccino', name: 'Emma Berry' }\n];\nvar check_orders = orders.filter(order =&gt; (order.name === &quot;John Appleseed&quot;));\nconsole.log(check_orders);\n<\/pre><\/div>\n\n\n\n<p>Our program returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>[{ drink: 'Cappuccino', name: 'John Appleseed' }]<\/pre><\/div>\n\n\n\n<p>We first declare an array called <em>orders.<\/em> This stores a list of the names of people who have placed an order and the drink they ordered. Then, we declare a <a href=\"https:\/\/careerkarma.com\/blog\/javascript-variables\/\">JavaScript variable<\/a> called <em>check_orders. <\/em>This variable uses the <em>filter()<\/em> function to check if anyone by the name of <em>John Appleseed<\/em> ordered a coffee today.<\/p>\n\n\n\n<p>We print out the value of the <em>check_orders<\/em> variable to the <a href=\"https:\/\/careerkarma.com\/blog\/javascript-console\/\">JavaScript console<\/a>. Because John Appleseed did place an order today, our function returns the record of his order. If he did not place an order, our program would return nothing.\n\n<\/p>\n\n\n\n<p>If you\u2019re interested in learning more about the <em>filter()<\/em> method, check out our tutorial on the JavaScript <a href=\"https:\/\/careerkarma.com\/blog\/javascript-filter-reduce\">filter() and reduce() methods<\/a>.\n\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The <em>includes()<\/em> method checks if a value is in an array. This method returns <em>true<\/em> or <em>false<\/em> depending on the outcome. The <em>filter()<\/em> method determines if an array of objects contains a particular value. This method returns the object that meets a certain criterion if it exists in the array.<\/p>\n\n\n\n<p>Do you want to learn more about JavaScript? Check out our How to Learn JavaScript guide. You&#8217;ll find expert advice and a list of top online courses, books, and resources you can use to help you learn.<\/p>\n","protected":false},"excerpt":{"rendered":"The JavaScript includes() method searches an array for an item. This method returns True if the element in the array exists. The filter() method lets you find an item in a list. Unlike includes(), the filter() method returns the item for which you have been searching. You may want to find out whether that array&hellip;","protected":false},"author":240,"featured_media":12568,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-12567","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>JavaScript Array Contains: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work 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-array-contains\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Array Contains: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/\" \/>\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-22T21:55:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:06:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"645\" \/>\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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"JavaScript Array Contains: A Step-By-Step Guide\",\"datePublished\":\"2020-12-22T21:55:36+00:00\",\"dateModified\":\"2023-12-01T12:06:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/\"},\"wordCount\":800,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/abstract-business-code-coder-270348.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/\",\"name\":\"JavaScript Array Contains: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/abstract-business-code-coder-270348.jpg\",\"datePublished\":\"2020-12-22T21:55:36+00:00\",\"dateModified\":\"2023-12-01T12:06:22+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/abstract-business-code-coder-270348.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/abstract-business-code-coder-270348.jpg\",\"width\":1200,\"height\":645},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-array-contains\\\/#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 Array Contains: A Step-By-Step 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\\\/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":"JavaScript Array Contains: A Step-By-Step Guide | Career Karma","description":"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work 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-array-contains\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Array Contains: A Step-By-Step Guide","og_description":"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-22T21:55:36+00:00","article_modified_time":"2023-12-01T12:06:22+00:00","og_image":[{"width":1200,"height":645,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"JavaScript Array Contains: A Step-By-Step Guide","datePublished":"2020-12-22T21:55:36+00:00","dateModified":"2023-12-01T12:06:22+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/"},"wordCount":800,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/","url":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/","name":"JavaScript Array Contains: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.jpg","datePublished":"2020-12-22T21:55:36+00:00","dateModified":"2023-12-01T12:06:22+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The JavaScript includes() and filter() methods determine whether an array contains a particular value. Learn how these methods work on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-array-contains\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/abstract-business-code-coder-270348.jpg","width":1200,"height":645},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-array-contains\/#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 Array Contains: A Step-By-Step 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\/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\/12567","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=12567"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12567\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12568"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}