{"id":1107,"date":"2014-10-15T16:15:00","date_gmt":"2014-10-15T13:15:00","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1107"},"modified":"2014-10-14T15:57:10","modified_gmt":"2014-10-14T12:57:10","slug":"javascript-closures","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/","title":{"rendered":"JavaScript Closures"},"content":{"rendered":"<p>Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the better you will write your JavaScript code. But, from my experience, most of the JavaScript beginners either do not understand Closure or do not know that the existence of the topic at all.<\/p>\n<p>So, in this post, I am trying to write down my understanding of Closures and their practical usages, in the hope that it will help some of you.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>What is a Closure?<\/h2>\n<p>So, what is it? As per the <a title=\"Define Closure\" href=\"https:\/\/encrypted.google.com\/search?hl=en&amp;q=define%20closure\">definition<\/a><\/p>\n<blockquote><p><em>Closure<\/em> : A thing that closes or seals something<\/p><\/blockquote>\n<p>So, a closure is kind of a box with some contents in it.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/cat.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-1209 size-full\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/cat.jpg\" alt=\"cat\" width=\"500\" height=\"430\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/cat.jpg 500w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/cat-300x258.jpg 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Lets say, you have a cat and you placed it inside a box along with a bunch of balls and sealed it. So, now the box acts like a closure that closes the cat and the balls. The cat still has access to the balls and it can access them whenever it pleases to do so.<\/p>\n<h2>JavaScript Closure<\/h2>\n<p>When it comes to JavaScript, instead of cats and balls, a Closure contains a function and all the variables that were in scope when the function got declared. Instead of cat, JavaScript places the function and instead of balls, it places all the variables that were in scope to that function.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-closure.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-1210 size-full\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-closure.jpg\" alt=\"js closure\" width=\"491\" height=\"166\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-closure.jpg 491w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-closure-300x101.jpg 300w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n<p>The important thing to note here is that the function that is inside the closure still has access to all the variables inside the closure. As long as the function exists, the variables inside closure will not get garbage collected, letting the function access them whenever it pleases do so.<\/p>\n<h2>Coding the Closure<\/h2>\n<p>Enough with english. Let&#8217;s see some JavaScript.<\/p>\n<p>Consider the below code.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">function sayHello(){\r\n  var message = 'Hello'; \/\/ 1. Define a local variable.\r\n  console.log(message); \/\/ 2. Prints Hello, as 'message' is still in scope.\r\n}\r\nsayHello();<\/pre>\n<p>As you&#8217;d expect, the code will print &#8216;Hello&#8217; on the console. Now, let&#8217;s tweak the code a little bit. Instead of printing the <code>message<\/code>, lets return a function that will print the message.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">function sayHello(){\r\n  var message = 'Hello'; \/\/ 1. Define a local variable.\r\n  return function(){ \/\/ 2. Return a function from sayHello.\r\n    console.log(message); \/\/ 4. Is 'message' still in scope?\r\n  }\r\n}\r\nvar helloSayer = sayHello();\r\nhelloSayer(); \/\/ 3. call the inner function returned from sayHello.<\/pre>\n<p>In the above,<\/p>\n<ol>\n<li>We define a variable <code>message<\/code> that is local to the function <code>sayHello<\/code> and only accessible from it.<\/li>\n<li>We declare a function and return it thus returning from <code>sayHello<\/code>. As common JavaScript knowledge goes, when we return from <code>sayHello<\/code>, all local variables inside that function will go out of scope and garbage collected. Will it happen to <code>message<\/code>? Let&#8217;s see.<\/li>\n<li>We call the inner function returned from <code>sayHello<\/code>.<\/li>\n<li>Surprisingly, the code will strill prints &#8216;Hello&#8217; and we can see that the inner function has access to the variable <code>message<\/code> even though we returned from the function. This is because of closure.<\/li>\n<\/ol>\n<p>If we recall, in JavaScript, a closure will contain the function and the set of variables that were in scope when the function got declared.<\/p>\n<p>In the above code, when we declare the inner function at line #2, JavaScript creates a closure and puts this function and the variable <code>message<\/code> (which is accessible to the function) in it. So, when the inner function getting called after we return from <code>sayHello<\/code> it still has access to the variable <code>message<\/code>.<\/p>\n<p>That explains the basics of Closure. In my next post, I&#8217;ll be covering some more <a href=\"http:\/\/veerasundar.com\/blog\/2013\/08\/javascript-closure-examples\/\">examples of closure<\/a>. Feel free to comment if you have any feedback.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/veerasundar.com\/blog\/2013\/08\/javascript-closures\/\">JavaScript Closures<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Veera Sundar at the <a href=\"http:\/\/veerasundar.com\/blog\/\">Veera Sundar<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the better you will write your JavaScript code. But, from my experience, most of the JavaScript beginners either do not understand Closure or do not know that the existence of the &hellip;<\/p>\n","protected":false},"author":6,"featured_media":920,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[35],"class_list":["post-1107","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-closures"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript Closures - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Closures - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-15T13:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Veera Sundar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Veera Sundar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\"},\"author\":{\"name\":\"Veera Sundar\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0246febd1de76c75168a687d7abb14b9\"},\"headline\":\"JavaScript Closures\",\"datePublished\":\"2014-10-15T13:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\"},\"wordCount\":604,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"keywords\":[\"Closures\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\",\"name\":\"JavaScript Closures - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"datePublished\":\"2014-10-15T13:15:00+00:00\",\"description\":\"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Closures\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0246febd1de76c75168a687d7abb14b9\",\"name\":\"Veera Sundar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/02fcdbdd31df95e9a89687c658f225572027173dac294346eba87cbef25bb5cf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/02fcdbdd31df95e9a89687c658f225572027173dac294346eba87cbef25bb5cf?s=96&d=mm&r=g\",\"caption\":\"Veera Sundar\"},\"sameAs\":[\"http:\/\/veerasundar.com\/blog\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/veera-sundar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Closures - Web Code Geeks - 2026","description":"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the","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:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Closures - Web Code Geeks - 2026","og_description":"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2014-10-15T13:15:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","type":"image\/jpeg"}],"author":"Veera Sundar","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Veera Sundar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/"},"author":{"name":"Veera Sundar","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0246febd1de76c75168a687d7abb14b9"},"headline":"JavaScript Closures","datePublished":"2014-10-15T13:15:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/"},"wordCount":604,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","keywords":["Closures"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/","name":"JavaScript Closures - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","datePublished":"2014-10-15T13:15:00+00:00","description":"Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-closures\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Closures"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0246febd1de76c75168a687d7abb14b9","name":"Veera Sundar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/02fcdbdd31df95e9a89687c658f225572027173dac294346eba87cbef25bb5cf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/02fcdbdd31df95e9a89687c658f225572027173dac294346eba87cbef25bb5cf?s=96&d=mm&r=g","caption":"Veera Sundar"},"sameAs":["http:\/\/veerasundar.com\/blog\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/veera-sundar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1107"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1107\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/920"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}