{"id":663,"date":"2024-09-20T09:39:34","date_gmt":"2024-09-20T09:39:34","guid":{"rendered":"https:\/\/algocademy.com\/blog\/top-10-typescript-interview-questions-you-must-prepare-for\/"},"modified":"2024-10-12T13:15:45","modified_gmt":"2024-10-12T13:15:45","slug":"top-10-typescript-interview-questions-you-must-prepare-for","status":"publish","type":"post","link":"https:\/\/algocademy.com\/blog\/top-10-typescript-interview-questions-you-must-prepare-for\/","title":{"rendered":"Top 10 TypeScript Interview Questions You Must Prepare For"},"content":{"rendered":"<p>If you&#8217;re preparing for a TypeScript interview, it&#8217;s essential to understand the key concepts that often come up in discussions. TypeScript is a powerful tool that enhances JavaScript by adding types, making your code safer and easier to read. This article covers the top 10 TypeScript interview questions to help you get ready and boost your confidence.<\/p>\n<h3>Key Takeaways<\/h3>\n<ul>\n<li>TypeScript adds types to JavaScript, helping to catch errors early.<\/li>\n<li>Understanding primitive types is fundamental to using TypeScript effectively.<\/li>\n<li>Arrays in TypeScript can hold multiple types, making them flexible.<\/li>\n<li>The &#8216;any&#8217; type allows you to bypass type checking when necessary.<\/li>\n<li>Optional properties let you define object fields that may or may not be present.<\/li>\n<\/ul>\n<h2>1. Primitive Types<\/h2>\n<p>In TypeScript, there are three main <strong>primitive types<\/strong> that you should know: string, number, and boolean. These types are similar to those in JavaScript and are essential for defining variables.<\/p>\n<h3>Types Overview<\/h3>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>string<\/td>\n<td>Represents text values like &quot;hello&quot; or &quot;TypeScript&quot;.<\/td>\n<\/tr>\n<tr>\n<td>number<\/td>\n<td>Represents numeric values such as 1, 2, or 3.<\/td>\n<\/tr>\n<tr>\n<td>boolean<\/td>\n<td>Represents a value that can be either true or false.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Key Points<\/h3>\n<ul>\n<li><strong>String<\/strong>: Used for text. For example, <code>let name: string = &quot;Alice&quot;;<\/code><\/li>\n<li><strong>Number<\/strong>: Used for numbers. For example, <code>let age: number = 30;<\/code><\/li>\n<li><strong>Boolean<\/strong>: Used for true\/false values. For example, <code>let isStudent: boolean = true;<\/code><\/li>\n<\/ul>\n<blockquote><p>\nUnderstanding these primitive types is crucial for any TypeScript developer. They form the foundation of how you work with data in your applications.\n<\/p><\/blockquote>\n<p>When preparing for your interview, remember that these types are the building blocks of TypeScript. Make sure you can explain how to use them effectively!<\/p>\n<h2>2. Arrays<\/h2>\n<p><img decoding=\"async\" style=\"max-width: 100%; max-height: 200px;\" src=\"https:\/\/contenu.nyc3.digitaloceanspaces.com\/journalist\/6d59fea3-d4e6-42c1-aa9c-f6b15598db33\/thumbnail.jpeg\" alt=\"Colorful arrays in a grid pattern with blurred background.\" ><\/p>\n<p>In TypeScript, <a href=\"https:\/\/www.geeksforgeeks.org\/typescript-interview-questions\/\" rel=\"noopener noreferrer\" target=\"_blank\">arrays are used to store multiple values<\/a> of the same type. They are ordered collections, meaning each item has a specific position, starting from index 0. For example, if you have an array of numbers, the first number is at index 0, the second at index 1, and so on.<\/p>\n<h3>Declaring Arrays<\/h3>\n<p>You can declare an array in TypeScript in a couple of ways:<\/p>\n<ol>\n<li>Using the square brackets:\n<pre><code class=\"language-typescript\">let numbers: number[] = [10, 20, 30];\n<\/code><\/pre>\n<\/li>\n<li>Using the <code>Array<\/code> type:\n<pre><code class=\"language-typescript\">let numbers: Array&lt;number&gt; = [10, 20, 30];\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<h3>Accessing Array Elements<\/h3>\n<p>To access elements in an array, you use their index. For example:<\/p>\n<ul>\n<li><code>numbers[0]<\/code> gives you <code>10<\/code><\/li>\n<li><code>numbers[1]<\/code> gives you <code>20<\/code><\/li>\n<\/ul>\n<h3>Important Points<\/h3>\n<ul>\n<li>Arrays can hold any type of data, but it&#8217;s best to keep them consistent.<\/li>\n<li>You can add or remove items from an array easily.<\/li>\n<\/ul>\n<blockquote><p>\nArrays in TypeScript are different from JavaScript. They have additional features that help manage data better.\n<\/p><\/blockquote>\n<h3>Example of Using Arrays<\/h3>\n<p>Here\u2019s a simple example of how to use arrays in TypeScript:<\/p>\n<pre><code class=\"language-typescript\">let fruits: string[] = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;];\nconsole.log(fruits[1]); \/\/ Output: banana\n<\/code><\/pre>\n<p>Understanding how to work with arrays is crucial for TypeScript programming, especially when handling collections of data.<\/p>\n<h2>3. Any Type<\/h2>\n<p>In TypeScript, the <a href=\"https:\/\/dev.to\/jessie_chen_4d333540e0c71\/interview-essentials-8-common-typescript-interview-questions-4jki\" rel=\"noopener noreferrer\" target=\"_blank\">any type<\/a> is a special type that allows you to store values of any kind. This is useful when you don\u2019t know the type of a value ahead of time, such as when data comes from an API or user input. For example:<\/p>\n<pre><code class=\"language-typescript\">let person: any = &quot;Foo&quot;;\n<\/code><\/pre>\n<h3>When to Use Any Type<\/h3>\n<ul>\n<li><strong>Flexibility<\/strong>: Use it when you need to handle different types of data without strict rules.<\/li>\n<li><strong>Temporary Solution<\/strong>: It can be a quick fix while developing, but it\u2019s better to replace it with specific types later.<\/li>\n<\/ul>\n<h3>Example of Any Type<\/h3>\n<p>Here\u2019s a simple example:<\/p>\n<pre><code class=\"language-typescript\">const employeeData: string = `{&quot;name&quot;: &quot;John Doe&quot;, &quot;salary&quot;: 60000}`;\nconst employee: any = JSON.parse(employeeData);\nconsole.log(employee.name);\nconsole.log(employee.salary);\n<\/code><\/pre>\n<h3>Important Note<\/h3>\n<p>Using the any type can lead to <strong>runtime errors<\/strong> because it skips type-checking. It\u2019s best to use it sparingly to keep your code safe and reliable.<\/p>\n<blockquote><p>\nRemember, while the any type offers flexibility, it can also make your code less safe. Always try to use more specific types when possible.\n<\/p><\/blockquote>\n<h3>Summary<\/h3>\n<p>The any type is a powerful feature in TypeScript, but it should be used wisely. It allows for flexibility but can introduce risks if overused. Always aim for type safety to avoid potential issues in your code.<\/p>\n<h2>4. Void Type<\/h2>\n<p>In TypeScript, the <strong>void type<\/strong> is used to indicate that a function does not return a value. This is particularly useful for functions that perform actions but do not need to send any data back to the caller. For example:<\/p>\n<pre><code class=\"language-typescript\">function notify(): void {\n  alert(&quot;The user has been notified.&quot;);\n}\n<\/code><\/pre>\n<p>When a function is declared with a return type of void, it means that it can only return <code>null<\/code> or <code>undefined<\/code>. Here\u2019s a simple breakdown of the void type:<\/p>\n<ul>\n<li><strong>Purpose<\/strong>: To signify that a function does not return a value.<\/li>\n<li><strong>Usage<\/strong>: Commonly used in event handlers or functions that perform side effects.<\/li>\n<\/ul>\n<h3>Key Points:<\/h3>\n<ul>\n<li>A void function can\u2019t return any value other than <code>null<\/code> or <code>undefined<\/code>.<\/li>\n<li>It is the opposite of the <code>any<\/code> type, which can hold any value.<\/li>\n<\/ul>\n<blockquote><p>\nThe void type is essential for functions that are meant to perform actions without needing to return data.\n<\/p><\/blockquote>\n<h3>Example:<\/h3>\n<p>Here\u2019s a quick example of a void function:<\/p>\n<pre><code class=\"language-typescript\">function logMessage(message: string): void {\n  console.log(message);\n}\n<\/code><\/pre>\n<p>In this example, <code>logMessage<\/code> takes a string and logs it to the console, but it does not return any value. Understanding the void type is crucial for <a href=\"https:\/\/zerotomastery.io\/blog\/typescript-interview-questions\/\" rel=\"noopener noreferrer\" target=\"_blank\">TypeScript interview questions<\/a> as it helps clarify how functions operate in TypeScript.<\/p>\n<h2>5. Unknown Type<\/h2>\n<p>The <a href=\"https:\/\/www.adaface.com\/blog\/typescript-interview-questions\/\" rel=\"noopener noreferrer\" target=\"_blank\">unknown type<\/a> in TypeScript is a safer alternative to the any type. It allows you to assign any value to it, but you cannot use that value until you check its type. This means you must perform some type-checking before using it, making your code safer.<\/p>\n<h3>Why Use Unknown?<\/h3>\n<ul>\n<li><strong>Type Safety<\/strong>: Unlike any, unknown requires you to check the type before using it.<\/li>\n<li><strong>Flexibility<\/strong>: You can still assign any value to it, but you must ensure it\u2019s the right type before using it.<\/li>\n<\/ul>\n<h3>Example of Unknown Type<\/h3>\n<p>Here\u2019s a simple example:<\/p>\n<pre><code class=\"language-typescript\">let input: unknown = &quot;Hello, TypeScript!&quot;;\n\nif (typeof input === &quot;string&quot;) {\n    console.log(input.toUpperCase()); \/\/ Safe to use as a string\n}\n<\/code><\/pre>\n<h3>Comparison with Any Type<\/h3>\n<table>\n<thead>\n<tr>\n<th>Feature<\/th>\n<th>Any Type<\/th>\n<th>Unknown Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Type Checking<\/td>\n<td>No type checking required<\/td>\n<td>Requires type checking<\/td>\n<\/tr>\n<tr>\n<td>Assignability<\/td>\n<td>Can assign any type<\/td>\n<td>Can assign any type, but must check before use<\/td>\n<\/tr>\n<tr>\n<td>Safety<\/td>\n<td>Less safe<\/td>\n<td>More safe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>\nUsing the unknown type helps you write more reliable code by enforcing type checks, especially when dealing with user input or data from APIs. It\u2019s a great way to ensure that your code behaves as expected without unexpected errors.\n<\/p><\/blockquote>\n<h2>6. Variable Declarations<\/h2>\n<p>In TypeScript, <a href=\"https:\/\/uk.indeed.com\/career-advice\/interviewing\/typescript-interview-questions\" rel=\"noopener noreferrer\" target=\"_blank\">variables are essential<\/a> for storing data. You can create variables using three main keywords: <code>var<\/code>, <code>let<\/code>, and <code>const<\/code>. Each has its own rules and uses.<\/p>\n<h3>1. Using <code>var<\/code><\/h3>\n<ul>\n<li>Declares a variable that can be accessed globally or within a function.<\/li>\n<li>Example:\n<pre><code class=\"language-typescript\">var name = &quot;Alice&quot;;\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>2. Using <code>let<\/code><\/h3>\n<ul>\n<li>Creates a variable that is limited to the block it is defined in.<\/li>\n<li>Example:\n<pre><code class=\"language-typescript\">let age = 30;\nif (true) {\n    let age = 25; \/\/ This age is different\n}\nconsole.log(age); \/\/ Outputs: 30\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>3. Using <code>const<\/code><\/h3>\n<ul>\n<li>Declares a constant variable that cannot be changed after it is set.<\/li>\n<li>Example:\n<pre><code class=\"language-typescript\">const pi = 3.14;\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>Summary of Variable Declarations<\/h3>\n<table>\n<thead>\n<tr>\n<th>Keyword<\/th>\n<th>Scope<\/th>\n<th>Reassignable<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>var<\/td>\n<td>Function\/Global<\/td>\n<td>Yes<\/td>\n<td><code>var x = 10;<\/code><\/td>\n<\/tr>\n<tr>\n<td>let<\/td>\n<td>Block<\/td>\n<td>Yes<\/td>\n<td><code>let y = 20;<\/code><\/td>\n<\/tr>\n<tr>\n<td>const<\/td>\n<td>Block<\/td>\n<td>No<\/td>\n<td><code>const z = 30;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>\nRemember, using let and const is generally preferred over var to avoid unexpected behavior due to scoping issues.\n<\/p><\/blockquote>\n<p>Understanding how to declare variables correctly is crucial for writing effective TypeScript code. It helps in managing data and ensuring that your code runs smoothly.<\/p>\n<h2>7. Arrow Function Syntax<\/h2>\n<p><img decoding=\"async\" style=\"max-width: 100%; max-height: 200px;\" src=\"https:\/\/contenu.nyc3.digitaloceanspaces.com\/journalist\/e8e18daa-eaf7-4bb3-8676-dcc41e7591c5\/thumbnail.jpeg\" alt=\"Laptop displaying TypeScript code with workspace background.\" ><\/p>\n<p>Arrow functions in TypeScript provide a <a href=\"https:\/\/www.geeksforgeeks.org\/explain-the-arrow-function-syntax-in-typescript\/\" rel=\"noopener noreferrer\" target=\"_blank\">concise way<\/a> to define functions. They are also known as lambdas in other programming languages. Here\u2019s a simple breakdown of how they work:<\/p>\n<h3>Key Features:<\/h3>\n<ul>\n<li><strong>Shorter Syntax<\/strong>: Arrow functions are shorter and easier to read compared to traditional function expressions.<\/li>\n<li><strong>Lexical <code>this<\/code><\/strong>: They inherit the <code>this<\/code> value from their surrounding context, which is helpful when using callbacks.<\/li>\n<\/ul>\n<h3>Example:<\/h3>\n<p>Here\u2019s how you can define a function that adds two numbers:<\/p>\n<pre><code class=\"language-typescript\">let add = (x: number, y: number): number =&gt; x + y;\n<\/code><\/pre>\n<p>This is much simpler than the traditional way:<\/p>\n<pre><code class=\"language-typescript\">function add(x: number, y: number): number {\n    return x + y;\n}\n<\/code><\/pre>\n<h3>Usage in Arrays:<\/h3>\n<p>Arrow functions are often used with array methods. For example, to filter an array for multiples of five:<\/p>\n<pre><code class=\"language-typescript\">let numbers = [3, 5, 9, 15, 34, 35];\nlet fiveMultiples = numbers.filter(num =&gt; (num % 5) === 0);\nconsole.log(fiveMultiples);  \/\/ Output: [5, 15, 35]\n<\/code><\/pre>\n<blockquote><p>\nArrow functions make your code cleaner and easier to understand. They are a great tool for modern TypeScript programming!\n<\/p><\/blockquote>\n<h2>8. Function Type Annotations<\/h2>\n<p>In TypeScript, <strong>function type annotations<\/strong> help you specify what types of values a function can accept and return. This makes your code clearer and safer. Here\u2019s how you can define a function with type annotations:<\/p>\n<pre><code class=\"language-typescript\">function greet(name: string): string {\n  return `Hello, ${name}`;\n}\n<\/code><\/pre>\n<p>In this example, the function <code>greet<\/code> takes a parameter <code>name<\/code> of type <code>string<\/code> and returns a value of type <code>string<\/code>. This means you can only pass a string to this function.<\/p>\n<h3>Benefits of Function Type Annotations<\/h3>\n<ul>\n<li><strong>Clarity<\/strong>: It\u2019s clear what types are expected.<\/li>\n<li><strong>Safety<\/strong>: Helps catch errors during development.<\/li>\n<li><strong>Documentation<\/strong>: Acts as a form of documentation for other developers.<\/li>\n<\/ul>\n<h3>Example of Function Type Annotations<\/h3>\n<p>Here\u2019s another example:<\/p>\n<pre><code class=\"language-typescript\">function add(a: number, b: number): number {\n  return a + b;\n}\n<\/code><\/pre>\n<p>This function <code>add<\/code> takes two numbers and returns their sum, which is also a number.<\/p>\n<h3>Summary<\/h3>\n<p>Using function type annotations is a great way to enhance your TypeScript code. They allow you to define the expected <strong>return type<\/strong> of a function, enhancing code clarity and type safety.<\/p>\n<blockquote><p>\nType annotations are essential for writing robust TypeScript code. They help prevent bugs and make your code easier to understand.\n<\/p><\/blockquote>\n<h2>9. Object Creation<\/h2>\n<p>Creating objects in TypeScript is straightforward and can be done in several ways. <strong>Understanding how to create objects is essential for effective programming.<\/strong> Here are some common methods:<\/p>\n<h3>1. Using Object Literals<\/h3>\n<p>You can create an object using curly braces. For example:<\/p>\n<pre><code class=\"language-typescript\">let person = {\n  name: &quot;John&quot;,\n  age: 30\n};\n<\/code><\/pre>\n<h3>2. Using Classes<\/h3>\n<p>Classes serve as blueprints for creating objects. Here\u2019s a simple example:<\/p>\n<pre><code class=\"language-typescript\">class Car {\n  make: string;\n  model: string;\n\n  constructor(make: string, model: string) {\n    this.make = make;\n    this.model = model;\n  }\n}\n\nlet myCar = new Car(&quot;Toyota&quot;, &quot;Corolla&quot;);\n<\/code><\/pre>\n<h3>3. Using Interfaces<\/h3>\n<p>Interfaces define the structure of an object. Here\u2019s how you can use them:<\/p>\n<pre><code class=\"language-typescript\">interface Animal {\n  species: string;\n  sound: string;\n}\n\nlet dog: Animal = {\n  species: &quot;Dog&quot;,\n  sound: &quot;Bark&quot;\n};\n<\/code><\/pre>\n<h3>4. Using the <code>new<\/code> Keyword<\/h3>\n<p>You can also create objects using the <code>new<\/code> keyword with a constructor function:<\/p>\n<pre><code class=\"language-typescript\">function Person(name: string, age: number) {\n  this.name = name;\n  this.age = age;\n}\n\nlet person1 = new Person(&quot;Alice&quot;, 25);\n<\/code><\/pre>\n<h3>Summary Table<\/h3>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Object Literals<\/td>\n<td>Simple and quick object creation.<\/td>\n<\/tr>\n<tr>\n<td>Classes<\/td>\n<td>Use for structured object creation.<\/td>\n<\/tr>\n<tr>\n<td>Interfaces<\/td>\n<td>Define object structure.<\/td>\n<\/tr>\n<tr>\n<td>Constructor<\/td>\n<td>Create objects with custom logic.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>\nObject creation is a fundamental skill in TypeScript that helps you build complex applications efficiently.\n<\/p><\/blockquote>\n<p>By mastering these methods, you can effectively manage and utilize objects in your TypeScript projects. Remember, <strong>practice makes perfect!<\/strong><\/p>\n<h2>10. Optional Properties<\/h2>\n<p>In TypeScript, <strong>optional properties<\/strong> allow you to define properties in an object that may or may not be present. This is useful when you want to create flexible data structures. You can indicate an optional property by adding a question mark (?) after the property name.<\/p>\n<h3>Example of Optional Properties<\/h3>\n<p>Here\u2019s a simple example:<\/p>\n<pre><code class=\"language-typescript\">interface User {\n    name: string;\n    age?: number; \/\/ age is optional\n}\n\nconst user1: User = { name: &quot;Alice&quot; }; \/\/ valid\nconst user2: User = { name: &quot;Bob&quot;, age: 30 }; \/\/ also valid\n<\/code><\/pre>\n<h3>Benefits of Using Optional Properties<\/h3>\n<ul>\n<li><strong>Flexibility<\/strong>: You can create objects without needing to specify every property.<\/li>\n<li><strong>Clarity<\/strong>: It makes it clear which properties are required and which are not.<\/li>\n<\/ul>\n<h3>Important Points<\/h3>\n<ul>\n<li>Optional properties can be used in both interfaces and type aliases.<\/li>\n<li>When accessing optional properties, you should check if they exist to avoid errors.<\/li>\n<\/ul>\n<blockquote><p>\nOptional properties help in creating more adaptable and clear data structures, making your code easier to manage.\n<\/p><\/blockquote>\n<h3>Summary<\/h3>\n<p>In summary, optional properties in TypeScript are a powerful feature that allows developers to create more flexible and understandable code. By using the question mark (?) syntax, you can easily define which properties are required and which are optional, enhancing the overall structure of your applications.<\/p>\n<p>In this section, we explore optional properties that can enhance your coding experience. If you&#8217;re eager to improve your skills and land that dream job, visit our website today! We offer <a href=\"https:\/\/algocademy.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">free coding lessons<\/a> to get you started on your journey.<\/p>\n<h2>Conclusion<\/h2>\n<p>Preparing for a TypeScript interview can feel overwhelming, but it doesn&#8217;t have to be. By focusing on the key questions we&#8217;ve discussed, you can build a strong foundation in TypeScript. Remember, understanding the basics and practicing coding problems will help you feel more confident. Whether you&#8217;re just starting out or have some experience, these questions will guide you in the right direction. Good luck, and don&#8217;t forget to keep learning and practicing!<\/p>\n<h2>Frequently Asked Questions<\/h2>\n<h3 data-jl-question>What are the basic types in TypeScript?<\/h3>\n<p data-jl-answer>TypeScript has several basic types like &#8216;number&#8217; for numbers, &#8216;string&#8217; for text, and &#8216;boolean&#8217; for true or false values.<\/p>\n<h3 data-jl-question>How do arrays work in TypeScript?<\/h3>\n<p data-jl-answer>In TypeScript, arrays are used to store multiple values in a single variable. You can create an array of any type, like numbers or strings.<\/p>\n<h3 data-jl-question>What does &#8216;any&#8217; type mean?<\/h3>\n<p data-jl-answer>The &#8216;any&#8217; type in TypeScript means that a variable can hold any kind of value. It&#8217;s useful when you are not sure what type you will have.<\/p>\n<h3 data-jl-question>What is the void type?<\/h3>\n<p data-jl-answer>The void type is used for functions that do not return any value. It tells us that the function doesn&#8217;t give back anything.<\/p>\n<h3 data-jl-question>What is an unknown type?<\/h3>\n<p data-jl-answer>The unknown type is a safer version of &#8216;any&#8217;. It means you don&#8217;t know what type it is yet, but you must check it before using it.<\/p>\n<h3 data-jl-question>How can I declare variables in TypeScript?<\/h3>\n<p data-jl-answer>You can declare variables using &#8216;let&#8217;, &#8216;const&#8217;, or &#8216;var&#8217;. &#8216;let&#8217; and &#8216;const&#8217; are the most common in modern TypeScript.<\/p>\n<h3 data-jl-question>What is arrow function syntax?<\/h3>\n<p data-jl-answer>Arrow functions are a shorter way to write functions in TypeScript. They use the &#8216;=>&#8217; symbol and are great for keeping code clean.<\/p>\n<h3 data-jl-question>How do I create objects in TypeScript?<\/h3>\n<p data-jl-answer>You can create objects using curly braces {}. You define properties and their types inside the object.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re preparing for a TypeScript interview, it&#8217;s essential to understand the key concepts that often come up in discussions&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":662,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-problem-solving"],"_links":{"self":[{"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/posts\/663"}],"collection":[{"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/comments?post=663"}],"version-history":[{"count":1,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"predecessor-version":[{"id":1557,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/posts\/663\/revisions\/1557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/media\/662"}],"wp:attachment":[{"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/algocademy.com\/blog\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}