{"id":12527,"date":"2020-12-17T14:51:14","date_gmt":"2020-12-17T22:51:14","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12527"},"modified":"2023-12-01T04:06:13","modified_gmt":"2023-12-01T12:06:13","slug":"javascript-trim","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-trim\/","title":{"rendered":"JavaScript Trim: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The JavaScript trim() method removes white space characters from the beginning and end of a string. The trimLeft() and trimStart() methods trim white space characters from the beginning of a string. trimRight() and trimEnd() trim white spaces from the end of a string. <\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>You may want to remove white spaces, such as spaces, tabs, or newlines, from the start or the end of a string. For example, suppose you have a string of customer names. You may want to make sure there are no extra spaces at the end of each name.<\/p>\n\n\n\n<p>That\u2019s where the JavaScript<em> trim()<\/em> function comes in. The<em> trim() <\/em>function removes white space characters from the start and end of a string.<\/p>\n\n\n\n<p>There are a few functions related to trim() that you may want to use:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>trimLeft()<\/li><li>trimStart()<\/li><li>trimRight()<\/li><li>trimEnd()<\/li><\/ul>\n\n\n\n<p>In this tutorial, we will explore the JavaScript trim() function and how it works. We will also look at the four related functions that you may want to use instead of or in addition to trim().<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript trim() String<\/h2>\n\n\n\n<p>The JavaScript trim() method removes any white spaces from the start and end of a string. The trim() method creates a new string. trim() does not accept any arguments. This method is added to the end of a string.<\/p>\n\n\n\n<p>Here is the syntax for the trim() method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var ourString = &quot;Test    &quot;:\n\nourString.trim();<\/pre><\/div>\n\n\n\n<p>This code removes all the white spaces from the start and end of our string. There are only white spaces at the end of our string so these are the only characters removed. trim() returns a new string. This is because JavaScript strings are immutable so they cannot be changed.<\/p>\n\n\n\n<p>It\u2019s common to encounter a string that starts or ends with an unnecessary white space character. White space characters include spaces, tabs, and newline characters.<\/p>\n\n\n\n<p>Trimming strings can come in handy in a range of situations.<\/p>\n\n\n\n<p>For example, say you have a preformatted string of text that includes spaces. You may need to remove those spaces for your code to function as intended. To learn more about formatting strings, check out our guide to <a href=\"https:\/\/careerkarma.com\/blog\/javascript-string-interpolation\/\">JavaScript string interpolation<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">trim() JavaScript Example<\/h3>\n\n\n\n<p>Here\u2019s an example of the JavaScript trim() function in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var studentName = &quot;Benjamin     &quot;;\nconsole.log(studentName.trim());<\/pre><\/div>\n\n\n\n<p>The value assigned to our <a href=\"https:\/\/careerkarma.com\/blog\/javascript-variables\/\">JavaScript variable<\/a> \u201cstudentName\u201d includes a number of spaces at the end. By using the trim function, we are able to remove those spaces.<\/p>\n\n\n\n<p>The trim() method returns a new string to the <a href=\"https:\/\/careerkarma.com\/blog\/javascript-console\/\">JavaScript console<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\u201cBenjamin\u201d<\/pre><\/div>\n\n\n\n<p>The trim() method removes white space characters at the end of our string. trim() does not change our original string. If we wanted to store our string in its trimmed form, we would need to create a new variable to store our string:\n<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var studentName = &quot;Benjamin     &quot;;\nvar trimmedStudentName = studentName.trim();\nconsole.log(trimmedStudentName);<\/pre><\/div>\n\n\n\n<p>Our code returns: <em>Benjamin<\/em>. Now our trimmed student name is stored within the variable <em>trimmedStudentName<\/em>. We can refer to the string throughout our program by using this variable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript trim() Additional Methods<\/h2>\n\n\n\n<p>It\u2019s important to note that the trim() function removes spaces from both the start and the end of a string.<\/p>\n\n\n\n<p>If you only want to remove spaces from the start or the end of a string, you should not use the trim() function. There are custom functions you can use for this purpose.<\/p>\n\n\n\n<p>Say you want to remove white space characters from the start of a string. You can do this using trimStart() or trimLeft(). If you want to remove white space characters from the end of a string, you can use trimEnd() or trimRight().<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JavaScript trimStart() and trimLeft()<\/h3>\n\n\n\n<p>Let&#8217;s suppose we want to remove white space characters from the beginning of a string. We have a name and we want to remove some white space characters from that name. Here\u2019s an example of trimStart() and trimLeft() in action to help us accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var studentName = &quot;     Benjamin     &quot;;\nconsole.log(studentName.trimStart());\nconsole.log(studentName.trimLeft());<\/pre><\/div>\n\n\n\n<p>Our code returns:\n\n<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&quot;     Benjamin&quot;\n&quot;     Benjamin&quot;<\/pre><\/div>\n\n\n\n<p>Notice that our code only removed the spaces from the start of our string because we used the trimStart() and trimLeft() methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JavaScript trimEnd() and trimRight()<\/h3>\n\n\n\n<p>Similarly, say we wanted to remove the white space from the end of our string. We could use the trimEnd() or trimRight() methods to do this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var studentName = &quot;     Benjamin     &quot;;\nconsole.log(studentName.trimEnd());\nconsole.log(studentName.trimRight());<\/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>&quot;Benjamin     &quot;\n&quot;Benjamin     &quot;<\/pre><\/div>\n\n\n\n<p>We have successfully removed the white spaces from the end of our string. But, the white space at the start of the string remains.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The JavaScript <em>trim()<\/em> function removes white spaces from the start and end of a string. trim() is added to the end of a string. The method does not accept any arguments.<\/p>\n\n\n\n<p>You can remove white spaces from specific ends of a string using the <em>trimStart()<\/em>, trimLeft(), trimEnd(), and trimRight() methods.<\/p>\n\n\n\n<p>Are you interested in learning more about JavaScript? Read our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-javascript\/\">How to Learn JavaScript guide<\/a>. You&#8217;ll find expert tips for learning JavaScript as well as guidance on top courses and online learning resources.<\/p>\n","protected":false},"excerpt":{"rendered":"The JavaScript trim() method removes white space characters from the beginning and end of a string. The trimLeft() and trimStart() methods trim white space characters from the beginning of a string. trimRight() and trimEnd() trim white spaces from the end of a string. You may want to remove white spaces, such as spaces, tabs, or&hellip;","protected":false},"author":240,"featured_media":12534,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-12527","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 Trim: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function 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-trim\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Trim: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-trim\/\" \/>\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-17T22:51:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:06:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"674\" \/>\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-trim\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"JavaScript Trim: A Step-By-Step Guide\",\"datePublished\":\"2020-12-17T22:51:14+00:00\",\"dateModified\":\"2023-12-01T12:06:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/\"},\"wordCount\":796,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/code-coder-coding-computer-270404.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/\",\"name\":\"JavaScript Trim: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/code-coder-coding-computer-270404.jpg\",\"datePublished\":\"2020-12-17T22:51:14+00:00\",\"dateModified\":\"2023-12-01T12:06:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/code-coder-coding-computer-270404.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/code-coder-coding-computer-270404.jpg\",\"width\":1200,\"height\":674},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-trim\\\/#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 Trim: 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 Trim: A Step-By-Step Guide | Career Karma","description":"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function 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-trim\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Trim: A Step-By-Step Guide","og_description":"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-trim\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-12-17T22:51:14+00:00","article_modified_time":"2023-12-01T12:06:13+00:00","og_image":[{"width":1200,"height":674,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.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-trim\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"JavaScript Trim: A Step-By-Step Guide","datePublished":"2020-12-17T22:51:14+00:00","dateModified":"2023-12-01T12:06:13+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/"},"wordCount":796,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-trim\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/","url":"https:\/\/careerkarma.com\/blog\/javascript-trim\/","name":"JavaScript Trim: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.jpg","datePublished":"2020-12-17T22:51:14+00:00","dateModified":"2023-12-01T12:06:13+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The JavaScript trim method removes whitespaces from both the start and the end of a string. Learn how to use the trim function Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-trim\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/code-coder-coding-computer-270404.jpg","width":1200,"height":674},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-trim\/#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 Trim: 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\/12527","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=12527"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12527\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12534"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}