{"id":1170,"date":"2021-06-11T16:55:02","date_gmt":"2021-06-11T12:55:02","guid":{"rendered":"https:\/\/tco.am\/blog\/?p=1170"},"modified":"2023-12-18T19:58:01","modified_gmt":"2023-12-18T15:58:01","slug":"javascript","status":"publish","type":"post","link":"https:\/\/tco.am\/blog\/javascript\/","title":{"rendered":"JavaScript"},"content":{"rendered":"\n<h1><strong>What is JavaScript<\/strong><\/h1>\n\n\n\n<p>JavaScript is a scripting or programming language that allows you to implement complex features on web pages \u2014 every time a web page does more than just sit there and display static information for you to look at \u2014 displaying timely content updates, interactive maps, animated 2D\/3D graphics, scrolling video jukeboxes, etc. \u2014 you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/HTML\">HTML<\/a>\u00a0and\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/CSS\">CSS<\/a>) we have covered in much more detail in other parts of the Learning Area<br>.<br><br><\/p>\n<!--more--><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"442\" height=\"429\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/cake.png\" alt=\"\" class=\"wp-image-1171\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/cake.png 442w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/cake-150x146.png 150w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"620\" height=\"400\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/0_ofpK1Fcgan3aCdZn.png\" alt=\"\" class=\"wp-image-1172\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/0_ofpK1Fcgan3aCdZn.png 620w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/0_ofpK1Fcgan3aCdZn-150x97.png 150w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/figure>\n\n\n\n<p>A\u00a0<strong>closure<\/strong>\u00a0is the combination of a function bundled together (enclosed) with references to its surrounding state (the\u00a0<strong>lexical environment<\/strong>). In other words, a closure gives you access to an outer function\u2019s scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.To use a closure, define a function inside another function and expose it. To expose a function, return it or pass it to another function.The inner function will have access to the variables in the outer function scope, even after the outer function has returned.<br><\/p>\n\n\n\n<h2><strong>Compose function<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault-800x450.jpg\" alt=\"\" class=\"wp-image-1173\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault-800x450.jpg 800w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault-750x422.jpg 750w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault-150x84.jpg 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault-768x432.jpg 768w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/maxresdefault.jpg 1280w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Function composition is the pointwise application of one function to the result of another. Developers do it in a manual manner every day when the nest functions.<\/p>\n\n\n\n<p>Reading compose from left to right allows a clear chaining of higher order functions. Real world examples are adding authentications, logging and context properties. It\u2019s a technique that enables reusability on the highest level.<\/p>\n\n\n\n<p>You might think this is advanced functional programming and it\u2019s not relevant for frontend programming. But it\u2019s also useful in Single Page Applications. For example you can add behavior to a React component by using higher order components<\/p>\n\n\n\n<p>In conclusion function composition enables reusability of functionality at a very high level. If the functions are structured well it enables developers to created new behavior based upon existing behavior.<\/p>\n\n\n\n<p>It also increases readability of implementations. Instead of nesting functions you can clearly chain functions and create higher order functions with meaningful names.<br><\/p>\n\n\n\n<h2><strong>Data types<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"993\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons-993x450.jpg\" alt=\"\" class=\"wp-image-1174\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons-993x450.jpg 993w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons-750x340.jpg 750w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons-150x68.jpg 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons-768x348.jpg 768w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-datatypes-01-splessons.jpg 1044w\" sizes=\"(max-width: 993px) 100vw, 993px\" \/><\/figure>\n\n\n\n<p>Data types basically specify what kind of data can be stored and manipulated within a program.<\/p>\n\n\n\n<p>There are six basic data types in JavaScript which can be divided into three main categories: primitive (or&nbsp;<em>primary<\/em>),&nbsp;<em>composite<\/em>&nbsp;(or&nbsp;<em>reference<\/em>), and&nbsp;<em>special<\/em>&nbsp;data types. String, Number, and Boolean are primitive data types. Object, Array, and Function (which are all types of objects) are composite data types. Whereas Undefined and Null are special data types.<\/p>\n\n\n\n<p>Primitive data types can hold only one value at a time, whereas composite data types can hold collections of values and more complex entities.<\/p>\n\n\n\n<h2><strong>Generators<\/strong><\/h2>\n\n\n\n<p>In JavaScript, a generator is a function which returns an object on which you can call&nbsp;next(). Every invocation of&nbsp;next()&nbsp;will return an object of shape \u2014<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>value: any,<\/p>\n\n\n\n<p>done: true\/false<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>The&nbsp;value&nbsp;property will contain the value. The&nbsp;done&nbsp;property is either&nbsp;true&nbsp;or&nbsp;false. When&nbsp;<\/p>\n\n\n\n<p>the&nbsp;done&nbsp;becomes&nbsp;true, the generator stops and won\u2019t generate any more values.&nbsp;<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"610\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/1_7X8rtWOiz5RKENZ_vugmKg-610x450.png\" alt=\"\" class=\"wp-image-1175\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/1_7X8rtWOiz5RKENZ_vugmKg-610x450.png 610w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/1_7X8rtWOiz5RKENZ_vugmKg-631x465.png 631w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/1_7X8rtWOiz5RKENZ_vugmKg-150x111.png 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/1_7X8rtWOiz5RKENZ_vugmKg.png 761w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p><strong>\u201cuse strict\u201d<\/strong><\/p>\n\n\n\n<p>The&nbsp;&#8220;use strict&#8221;&nbsp;directive was new in ECMAScript version 5.<\/p>\n\n\n\n<p>It is not a statement, but a literal expression, ignored by earlier versions of JavaScript.<\/p>\n\n\n\n<p>The purpose of&nbsp;&#8220;use strict&#8221;&nbsp;is to indicate that the code should be executed in &#8220;strict mode&#8221;.<\/p>\n\n\n\n<p>You can use strict mode in all your programs. It helps you to write cleaner code, like&nbsp;<\/p>\n\n\n\n<p>preventing you from using undeclared variables.<\/p>\n\n\n\n<p>&#8220;use strict&#8221;\u00a0is just a string, so IE 9 will not throw an error even if it does not understand it.<br><\/p>\n\n\n\n<h2><strong>Iterators<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"376\" height=\"205\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-iterator.jpg\" alt=\"\" class=\"wp-image-1176\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-iterator.jpg 376w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/javascript-iterator-150x82.jpg 150w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/figure>\n\n\n\n<p>In JavaScript an&nbsp;<strong>iterator<\/strong>&nbsp;is an object which defines a sequence and potentially a return value upon its termination.<\/p>\n\n\n\n<p>Specifically, an iterator is any object which implements the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Iteration_protocols#the_iterator_protocol\">Iterator protocol<\/a>&nbsp;by having a&nbsp;next()&nbsp;method that returns an object with two properties:<\/p>\n\n\n\n<p><strong><em>value<\/em><\/strong><\/p>\n\n\n\n<p>The next value in the iteration&nbsp;sequence.<\/p>\n\n\n\n<p><strong><em>done<\/em><\/strong><\/p>\n\n\n\n<p>This is&nbsp;true&nbsp;if the last value in the sequence has already been consumed. If&nbsp;<em>value<\/em>&nbsp;is present alongside&nbsp;<em>done<\/em>, it is the iterator&#8217;s return value.<\/p>\n\n\n\n<p>Once created, an iterator object can be iterated explicitly by repeatedly calling&nbsp;next(). Iterating over an iterator is said to consume the iterator, because it is generally only possible to do once. After a terminating value has been yielded additional calls to&nbsp;next()&nbsp;should continue to return&nbsp;{done: true}.<\/p>\n\n\n\n<p>The most common iterator in JavaScript is the Array iterator, which returns each value in the associated array in sequence.<\/p>\n\n\n\n<p>While it is easy to imagine that all iterators could be expressed as arrays, this is not true. Arrays must be allocated in their entirety, but iterators are consumed only as necessary. Because of this, iterators can express sequences of unlimited size, such as the range of integers between&nbsp;0&nbsp;and&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Infinity\">Infinity<\/a>.<\/p>\n\n\n\n<h2><strong>Map and Set<\/strong><\/h2>\n\n\n\n<p>Till now, we\u2019ve learned about the following complex data structures:<\/p>\n\n\n\n<ul><li>Objects are used for storing keyed collections.<\/li><li>Arrays are used for storing ordered collections.<\/li><\/ul>\n\n\n\n<p>But that\u2019s not enough for real life. That\u2019s why&nbsp;Map&nbsp;and&nbsp;Set&nbsp;also exist.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"900\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig-900x450.jpg\" alt=\"\" class=\"wp-image-1177\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig-900x450.jpg 900w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig-750x375.jpg 750w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig-150x75.jpg 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig-768x384.jpg 768w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/jgdkw3agh1g9sxigzmig.jpg 1200w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p><br><br><\/p>\n\n\n\n<p><a href=\"https:\/\/javascript.info\/map-set#map\"><strong>Map<\/strong><\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Map\">Map<\/a>&nbsp;is a collection of keyed data items, just like an&nbsp;Object. But the main difference is that&nbsp;Map&nbsp;allows keys of any type.<\/p>\n\n\n\n<p>Methods and properties are:<\/p>\n\n\n\n<ul><li>new Map()&nbsp;\u2013 creates the map.<\/li><li>map.set(key, value)&nbsp;\u2013 stores the value by the key.<\/li><li>map.get(key)&nbsp;\u2013 returns the value by the key,&nbsp;undefined&nbsp;if&nbsp;key&nbsp;doesn\u2019t exist in map.<\/li><li>map.has(key)&nbsp;\u2013 returns&nbsp;true&nbsp;if the&nbsp;key&nbsp;exists,&nbsp;false&nbsp;otherwise.<\/li><li>map.delete(key)&nbsp;\u2013 removes the value by the key.<\/li><li>map.clear()&nbsp;\u2013 removes everything from the map.<\/li><li>map.size&nbsp;\u2013 returns the current element count.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/javascript.info\/map-set#set\"><strong>Set<\/strong><\/a><\/p>\n\n\n\n<p>A&nbsp;Set&nbsp;is a special type collection \u2013 \u201cset of values\u201d (without keys), where each value may occur only once.<\/p>\n\n\n\n<p>Its main methods are:<\/p>\n\n\n\n<ul><li>new Set(iterable)&nbsp;\u2013 creates the set, and if an&nbsp;iterable&nbsp;object is provided (usually an array), copies values from it into the set.<\/li><li>set.add(value)&nbsp;\u2013 adds a value, returns the set itself.<\/li><li>set.delete(value)&nbsp;\u2013 removes the value, returns&nbsp;true&nbsp;if&nbsp;value&nbsp;existed at the moment of the call, otherwise&nbsp;false.<\/li><li>set.has(value)&nbsp;\u2013 returns&nbsp;true&nbsp;if the value exists in the set, otherwise&nbsp;false.<\/li><li>set.clear()&nbsp;\u2013 removes everything from the set.<\/li><li>set.size&nbsp;\u2013 is the elements count.<\/li><\/ul>\n\n\n\n<p>The main feature is that repeated calls of&nbsp;set.add(value)&nbsp;with the same value don\u2019t do anything. That\u2019s the reason why each value appears in a&nbsp;Set&nbsp;only once.<\/p>\n\n\n\n<p>For example, we have visitors coming, and we\u2019d like to remember everyone. But repeated visits should not lead to duplicates. A visitor must be \u201ccounted\u201d only once.<\/p>\n\n\n\n<h2><strong>What is a JavaScript Proxy object<\/strong>?<\/h2>\n\n\n\n<p>A JavaScript Proxy is an&nbsp;<a href=\"https:\/\/www.javascripttutorial.net\/javascript-objects\/\">object<\/a>&nbsp;that wraps another object (target) and intercepts the fundamental operations of the target object.<\/p>\n\n\n\n<p>The fundamental operations can be the property lookup, assignment, enumeration, and function invocations, etc.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"684\" height=\"428\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_1.png\" alt=\"\" class=\"wp-image-1178\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_1.png 684w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_1-150x94.png 150w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure>\n\n\n\n<h3><strong>Reflect<\/strong><\/h3>\n\n\n\n<p><strong>Reflect<\/strong>&nbsp;is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Proxy\/Proxy\">proxy handlers<\/a>.&nbsp;Reflect&nbsp;is not a function object, so it&#8217;s not constructible.<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Reflect#description\">Description<\/a><\/p>\n\n\n\n<p>Unlike most&nbsp;global objects,&nbsp;Reflect&nbsp;is not a constructor. You cannot use it with a&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/new\">new&nbsp;operator<\/a>&nbsp;or invoke the&nbsp;Reflect&nbsp;object as a function. All properties and methods of&nbsp;Reflect&nbsp;are static (just like the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Math\">Math<\/a>&nbsp;object).<\/p>\n\n\n\n<p>The&nbsp;Reflect&nbsp;object provides the following static functions which have the same names as the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Proxy\/Proxy\">proxy handler methods<\/a>.<\/p>\n\n\n\n<p>Some of these methods are also the same as corresponding methods on&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Object\">Object<\/a>, although they do have&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Reflect\/Comparing_Reflect_and_Object_methods\">some subtle differences<\/a>&nbsp;between them.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"613\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_2-613x450.png\" alt=\"\" class=\"wp-image-1179\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_2-613x450.png 613w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_2-633x465.png 633w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_2-150x110.png 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/Screenshot_2.png 677w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/figure>\n\n\n\n<h3><strong>Design Patterns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"860\" height=\"450\" src=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-860x450.png\" alt=\"\" class=\"wp-image-1180\" srcset=\"https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-860x450.png 860w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-750x392.png 750w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-150x78.png 150w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-768x402.png 768w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad-1536x804.png 1536w, https:\/\/tco.am\/blog\/wp-content\/uploads\/2021\/06\/toptal-blog-image-1522333595770-14ba14a2f6099482fa9189f8764dd5ad.png 1720w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/figure>\n\n\n\n<p>Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language.<\/p>\n\n\n\n<p>One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we&#8217;re attempting to solve.<\/p>\n\n\n\n<p>Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we&#8217;re attempting to convey a way of structuring a solution in code form to others.<\/p>\n\n\n\n<p>In this book we will explore applying both classical and modern design patterns to the JavaScript programming language.<\/p>\n\n\n\n<h2><strong>What is Data Structure?<\/strong><\/h2>\n\n\n\n<p>The data structure name indicates itself that organizing the data in memory. There are many ways of organizing the data in the memory as we have already seen one of the data structures, i.e., array in C language. Array is a collection of memory elements in which data is stored sequentially, i.e., one after another. In other words, we can say that array stores the elements in a continuous manner. This organization of data is done with the help of an array of data structures. There are also other ways to organize the data in memory. Let&#8217;s see the different types of data structures.<\/p>\n\n\n\n<p>The data structure is not any programming language like C, C++, java, javascript, etc. It is a set of algorithms that we can use in any programming language to structure the data in the memory.<\/p>\n\n\n\n<p>To structure the data in memory, &#8216;n&#8217; number of algorithms were proposed, and all these algorithms are known as Abstract data types. These abstract data types are the set of rules.<br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is JavaScript JavaScript is a scripting or programming language that allows you to implement complex features on web pages \u2014 every time a web page does more than just sit there and display static information for you to look at \u2014 displaying timely content updates, interactive maps, animated 2D\/3D graphics, scrolling video jukeboxes, etc. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1183,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[72,37,74],"tags":[],"_links":{"self":[{"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/posts\/1170"}],"collection":[{"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/comments?post=1170"}],"version-history":[{"count":2,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/posts\/1170\/revisions"}],"predecessor-version":[{"id":1351,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/posts\/1170\/revisions\/1351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/media\/1183"}],"wp:attachment":[{"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/media?parent=1170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/categories?post=1170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tco.am\/blog\/wp-json\/wp\/v2\/tags?post=1170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}