{"id":25583926,"date":"2024-05-21T23:27:09","date_gmt":"2024-05-21T17:57:09","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25583926"},"modified":"2024-05-24T00:05:48","modified_gmt":"2024-05-23T18:35:48","slug":"javascript-oops-interview-question","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/","title":{"rendered":"Javascript OOPs Interview Questions [2024]"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69ea45906cb90\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69ea45906cb90\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#Why_learn_JavaScript\" >Why learn JavaScript<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#Top_Javascript_Questions_and_Answers\" >Top Javascript Questions and Answers<\/a><\/li><\/ul><\/nav><\/div>\n<p>An open-source programming language is JavaScript. It is intended for use in the development of web-based apps. It is substantially faster than other languages because it is interpreted and lightweight. Because JavaScript and HTML are interwoven, using JavaScript in online applications is much simpler.<\/p>\n<p>The core idea of the programming paradigm known as &#8220;Object-Oriented Programming,&#8221; or OOPs, is &#8220;OBJECTS.&#8221; Objects are thought of as actual examples of entities, such as classes, that have the traits and actions listed in the class template. You can find a thorough list of frequently asked interview questions and responses for JavaScript in this post. It will also assist you in comprehending JavaScript&#8217;s core ideas.<\/p>\n<p style=\"text-align: center\"><strong><a href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\" target=\"_blank\" rel=\"noopener\">\u00a0Learn Full Stack Development with expert mentors! Get Free Demo Here!<\/a><\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Introduction\"><\/span><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Introduction \\nwhy learn javaScript\\nTop javascript Questions and answers\\nFAQs&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6723,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;9&quot;:0,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Arial&quot;}\"><strong>Introduction<\/strong><br \/>\n<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Brendan Eich introduced JavaScript in 1995, and it&#8217;s one of the most used languages for online development. Initially, it was intended to create dynamic web pages. Any web page&#8217;s HTML can have a script added to it, which is a JavaScript programme. These scripts run on their own when the page loads.<\/p>\n<p>JavaScript Engine-installed devices and servers can both run a language that was initially intended for creating dynamic web pages.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_learn_JavaScript\"><\/span><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Introduction \\nwhy learn javaScript\\nTop javascript Questions and answers\\nFAQs&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6723,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;9&quot;:0,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Arial&quot;}\"><strong>Why learn JavaScript<\/strong><br \/>\n<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The JavaScript is the third most popular web technology, behind HTML and CSS. And JavaScript is a programming language that may be used to create web servers, games, mobile and online apps, and more. Also JavaScript is a computer language that is object-oriented and is used to create webpages and applications. It was meant to be seen in a browser when it was designed.<\/p>\n<p>Videogames, real-time applications, online streaming applications, and internet and mobile apps can all be made with the server-side JavaScript variant known as Node.js. Desktop and mobile applications can be created with Javascript frameworks, also referred to as built-in libraries. By utilising these code libraries, developers can save a significant amount of time on tedious programming tasks and concentrate on the development process&#8217; producing work.<\/p>\n<p style=\"text-align: center\"><strong><a href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\" target=\"_blank\" rel=\"noopener\">\u00a0Learn Full Stack Development with expert mentors! Get Free Demo Here!<\/a><\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Top_Javascript_Questions_and_Answers\"><\/span><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Introduction \\nwhy learn javaScript\\nTop javascript Questions and answers\\nFAQs&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6723,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;9&quot;:0,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Arial&quot;}\"><strong>Top Javascript Questions and Answers<\/strong><br \/>\n<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h5><strong>Q. What does OOPs JavaScript mean?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> JavaScript in OOPs refers to the concepts and features of object-oriented programming found in the JavaScript language. This covers ideas like polymorphism, inheritance, encapsulation, classes, and objects.<\/p>\n<h5><strong>Q. What knowledge do you have regarding JavaScript?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> JavaScript is a widely used web scripting language that can be used for both server-side and client-side development. JavaScript code is compatible with object-oriented programming and can be added to HTML pages that web browsers can comprehend and run.<\/p>\n<h5><strong>Q. Differences between JavaScript and Java?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>JavaScript<\/strong><\/td>\n<td><strong>Java<\/strong><\/td>\n<\/tr>\n<tr>\n<td>The JavaScript is an object-oriented scripting language.<\/td>\n<td>The Java is an object-oriented programming language.<\/td>\n<\/tr>\n<tr>\n<td>Applications written in JavaScript are designed to operate on a web browser.<\/td>\n<td>Applications written in Java are typically designed to run on virtual machines and operating systems.<\/td>\n<\/tr>\n<tr>\n<td>It is not necessary to compile JavaScript before executing the application code.<\/td>\n<td>Before Java source code can be prepared for real-time execution, it must be compiled.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5><strong>Q. What kinds of data types are there in JavaScript?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> The various kinds of data that JavaScript can handle are as follows:<\/p>\n<ul>\n<li>Boolean: For values that are true or false<\/li>\n<li>Null: For values that are empty or unclear<\/li>\n<li>Undefined: Refers to variables that are merely declared without being initialised or defined.<\/li>\n<li>Number: For floating-point and integer values<\/li>\n<li>String: Used for alphanumeric and character values<\/li>\n<li>Object: For sets or intricate values<\/li>\n<li>Symbols: For distinct object IDs<\/li>\n<\/ul>\n<h5><strong>Q. What characteristics does JavaScript have?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> The attributes of JavaScript are as follows:<\/p>\n<ul>\n<li>Interpretive programming language that is lightweight<\/li>\n<li>Compatible with multiple platforms<\/li>\n<li>Source-free Object-oriented<\/li>\n<li>Combining several front-end and back-end technologies<\/li>\n<li>Specifically utilised in the creation of network-based applications<\/li>\n<\/ul>\n<div class=\"video-sticky-wrap\">\n<div class=\"info-details video-info\">\n<div id=\"articleLongDescription\" class=\"tutorialContent\">\n<article class=\"desig_author empty-text\">\n<article>\n<h5><strong>Q. In JavaScript, how do you build an object?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> JavaScript supports and promotes the use of objects while creating web applications since it is fundamentally an object-oriented programming language.<\/p>\n<p>const student = {<\/p>\n<p>name: &#8216;Alice&#8217;,<\/p>\n<p>age: 22<\/p>\n<p>}<\/p>\n<h5><strong>Q. In JavaScript, how do you build an array?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> Here&#8217;s a very basic JavaScript array creation method that makes use of the array literal:<\/p>\n<p>var X = [];<\/p>\n<p>var Y = [\u20181\u2019, \u20182\u2019, \u20183\u2019, \u20184\u2019, \u20185\u2019];<\/p>\n<\/article>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<h5><strong>Q. Which are some of the JavaScript built-in methods?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Built-in Methods<\/strong><\/td>\n<td><strong>Keyvalues<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Date()<\/td>\n<td>It returns the present date and time<\/td>\n<\/tr>\n<tr>\n<td>concat()<\/td>\n<td>It will joins two strings and returns the new string<\/td>\n<\/tr>\n<tr>\n<td>push()<\/td>\n<td>It adds an item to an array<\/td>\n<\/tr>\n<tr>\n<td>pop()<\/td>\n<td>It will removes and also returns the last element of an array<\/td>\n<\/tr>\n<tr>\n<td>round()<\/td>\n<td>The rounds of the value to the nearest integer and then returns it<\/td>\n<\/tr>\n<tr>\n<td>length()<\/td>\n<td>This will returns the length of a string<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5><strong>Q. In JavaScript, what are the scopes of a variable?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> A variable&#8217;s scope indicates the locations of its declarations and definitions within a JavaScript programme. A variable can have one of two scopes:<\/p>\n<p><strong>Global Scope:<\/strong> In a JavaScript code, global variables with global scope are accessible anywhere.<\/p>\n<p><strong>Local Scope:<\/strong> Local variables can only be accessed from within the function that defines them.<\/p>\n<h5><strong>Q. What kinds of data types are there in JavaScript?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> Two forms of data exist in JavaScript: primitive and non-primitive data types.<\/p>\n<ul>\n<li>Primitive Data Types: A single value is stored in these data types. The Primitive data type&#8217;s sub-data types are listed below.<\/li>\n<li>Types of Boolean Data: It keeps both real and fake values.<\/li>\n<\/ul>\n<p><strong>Example1:<\/strong><\/p>\n<p>varx = 2;<\/p>\n<p>vary =\u00a0 4;<\/p>\n<p>varz = 5;<\/p>\n<p>(x == y) \/\/ returns false<\/p>\n<p>(x == z) \/\/returns true<\/p>\n<ul>\n<li><strong>Null data Types:<\/strong> It will stores either empty or unknown.<\/li>\n<\/ul>\n<p><strong>Example2:<\/strong><\/p>\n<p>var a = null;<\/p>\n<ul>\n<li><strong>Undefined data Types:<\/strong> Variables that are merely declared\u2014not defined or initialized\u2014are stored there.<\/li>\n<\/ul>\n<p><strong>Example3:<\/strong><\/p>\n<p>var x; \/\/ x is undefined<\/p>\n<p>var y = undefined; \/\/ We can alternatively change the y variable&#8217;s value to undefined.<\/p>\n<ul>\n<li><strong>Number Data Types:<\/strong> It keeps both floating-point and integer values.<\/li>\n<\/ul>\n<p><strong>Example4:<\/strong><\/p>\n<p>var a = 2;<\/p>\n<p>var b = 3.2;<\/p>\n<ul>\n<li>String data Types: It will keep both characters and alphanumeric values.<\/li>\n<\/ul>\n<p><strong>Example5:<\/strong><\/p>\n<p>var str1 = &#8221; Entri App &#8220;;<\/p>\n<p>var str2 = &#8216;Entri App is Learning App&#8217;;<\/p>\n<p style=\"text-align: center\"><strong><a href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\" target=\"_blank\" rel=\"noopener\">\u00a0Learn Full Stack Development with expert mentors! Get Free Demo Here!<\/a><\/strong><\/p>\n<h5><strong>Q. Which are the main languages used in object-oriented programming?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> Object-Oriented programming languages are those that employ and adhere to the OOPs, or object-oriented programming paradigm. Among the most popular languages for object-oriented programming are:<\/p>\n<article class=\"ibpage-article\">\n<ul>\n<li><strong>Java<\/strong><\/li>\n<li><strong>C++<\/strong><\/li>\n<li><strong>Javascript<\/strong><\/li>\n<li><strong>Python<\/strong><\/li>\n<li><strong>PHP<\/strong><\/li>\n<\/ul>\n<section id=\"difference-between-and-operators\" class=\"ibpage-article-header\">\n<h5><strong>Q. Difference between \u201c == \u201c and \u201c === \u201c operators.<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Both are comparison operators. The difference between both the operators is that \u201c==\u201d is used to compare values whereas, \u201c === \u201c is used to compare both values and types.<strong>Example:<\/strong><\/p>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-keyword\">var<\/span> a = 4;\r\n<span class=\"hljs-keyword\">var<\/span> b = <span class=\"hljs-string\">\"4\"<\/span>;\r\n(a == b)  <span class=\"hljs-comment\">\/\/ returns true since a and b have the same value (a === b).\u00a0<\/span>\r\n(a === b) <span class=\"hljs-comment\">\/\/ Since the type of an is \"number\" and the type of b is \"string,\" the result is false.<\/span><\/code><\/pre>\n<\/article>\n<\/section>\n<section id=\"difference-between-var-and-let-keyword-in-javascript\" class=\"ibpage-article-header\">\n<h5><strong>Q. Differences between the JavaScript keywords let and var.<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li>The JavaScript programming language has utilised the &#8216;var&#8217; keyword since its inception, while the &#8216;let&#8217; keyword was introduced in 2015.<\/li>\n<li>&#8220;Var&#8221; is a keyword with a function scope. The variable declared with the var keyword can be accessed anywhere in the function, but a variable declared with the &#8216;let&#8217; keyword can only be used in the block in which it is declared. First, let&#8217;s create a block scope.<\/li>\n<li>Let and const are hoisted but not initialised in ECMAScript 2015. The variable is in a &#8220;temporal dead zone&#8221; from the beginning of the block until the declaration is processed, therefore referencing it in the block before the variable declaration causes a ReferenceError.<\/li>\n<\/ul>\n<article class=\"ibpage-article\">\n<h5><strong>Q. Define NaN property in JavaScript?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> The &#8220;Not-a-Number&#8221; value is represented by the NaN attribute. It displays a number that is not allowed.kind of NaN will provide a number.<\/p>\n<article class=\"ibpage-article\">\n<h5><strong>Q. Differences passed by value and passed by reference.<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Non-primitive data types are passed by reference in JavaScript, while primitive data types are supplied by value.Understanding what occurs when we create a variable and give it a value is necessary in order to comprehend passed by value and passed by reference.<\/p>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-keyword\">var<\/span> a = 5;<\/code><\/pre>\n<p>We made the variable an in the example above and gave it the value &#8220;5&#8221;. The assign operator, &#8220;=,&#8221; allocates memory in the background, stores the value &#8220;5&#8221;, and then returns the address of the memory space that has been allotted. Consequently, rather than directly linking to the value 5, the variable an in the code above points to the location of the memory space.<\/p>\n<section id=\"script-mode-and-its-characteristics\" class=\"ibpage-article-header\">\n<h5><strong>Q. What is strict mode in javascript and list out its characteristics?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> You can create code or a function in a &#8220;strict&#8221; operating environment with ECMAScript 5 thanks to a new feature called JavaScript Strict Mode. This wording is typically &#8216;not exceptionally severe&#8217; in terms of throwing errors. But in &#8220;Strict mode,&#8221; every kind of error\u2014even silent errors\u2014will be raised. Debugging so becomes more easier as a result. As a result, the likelihood of a programming error is reduced.<\/p>\n<ul>\n<li>Developers do not allow duplicate parameters.<\/li>\n<li>You cannot use the JavaScript keyword as a function name or parameter when using strict mode.<\/li>\n<li>At the beginning of the script, strict mode is defined using the &#8216;use strict&#8217; keyword. All browsers support the Strict mode.<\/li>\n<li>Global variables cannot be created by engineers in &#8220;Strict Mode.&#8221;<\/li>\n<\/ul>\n<\/article>\n<\/section>\n<section id=\"explain-higher-order-functions-in-javascript\" class=\"ibpage-article-header\">\n<h5><strong>Q. What is Higher Order Functions in javascript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Higher-order functions are those that perform operations on other functions, either by returning them or by accepting them as arguments.Because functions are first-class citizens in JavaScript, higher-order functions are the outcome.<br \/>\nExamples:<\/p>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">higherOrder<\/span>(<span class=\"hljs-params\">fn<\/span>) <\/span>{\r\n  fn();\r\n}\r\n   \r\nhigherOrder(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>() <\/span>{ <span class=\"hljs-built_in\">console<\/span>.log(<span class=\"hljs-string\">\"Entri App\"<\/span>) }); \u00a0<\/code><\/pre>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">higherOrder1<\/span>() <\/span>{\r\n  <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>() <\/span>{\r\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"Entri\"<\/span>;\r\n  }\r\n}      \r\n<span class=\"hljs-keyword\">var<\/span> a = higherOrder1();\r\na()   <span class=\"hljs-comment\">\/\/ Returns \"Entri\"<\/span><\/code><\/pre>\n<\/article>\n<\/section>\n<\/article>\n<\/article>\n<\/article>\n<\/section>\n<\/article>\n<h5><strong>Q. Define \u201cthis\u201d keyword.<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> As a property of an object, the function is denoted by the keyword &#8220;this&#8221;.\u00a0 The object calling the function will always determine the value of the &#8220;this&#8221; keyword.<\/p>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">doSomething<\/span>() <\/span>{\r\n  <span class=\"hljs-built_in\">console<\/span>.log(<span class=\"hljs-built_in\">this<\/span>);\r\n}\r\n   \r\ndoSomething();<\/code><\/pre>\n<\/article>\n<section id=\"difference-between-exec-and-test-methods-in-javascript\" class=\"ibpage-article-header\">\n<h5><strong>Q. Differences between exec () and test () methods in javascript?<\/strong><\/h5>\n<p><strong>Answer:\u00a0<\/strong><\/p>\n<article class=\"ibpage-article\">\n<ul>\n<li>JavaScript uses the RegExp expression methods test() and exec ().<\/li>\n<li>To search a string for a specific pattern, we&#8217;ll use exec (). If the pattern is found, the function will return it straight; if not, it will return &#8217;empty&#8217;.<\/li>\n<li>A test () will be used to locate a string for a particular pattern. When it locates the provided text, it will return the Boolean value &#8220;true&#8221;; otherwise, it will return &#8220;false.&#8221;<\/li>\n<\/ul>\n<\/article>\n<\/section>\n<section id=\"currying\" class=\"ibpage-article-header\">\n<h5><strong>Q. What is currying in JavaScript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Currying is a sophisticated method for converting a function with n arguments into n functions with one or more arguments.<\/article>\n<article class=\"ibpage-article\">\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">add<\/span> (x) <\/span>{\r\n  <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(y)<\/span>{\r\n    <span class=\"hljs-keyword\">return<\/span> x + y;\r\n  }\r\n}\r\n\r\nadd(2)(5)\u00a0<\/code><\/pre>\n<h5><strong>Q. What is object prototypes?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> A prototype is the source of all properties for javascript objects.<\/p>\n<ul>\n<li>The Date prototype&#8217;s properties are inherited by Date objects.<\/li>\n<li>Properties of the Math prototype are inherited by Math objects.<\/li>\n<li>The Array prototype&#8217;s properties are passed down to array objects.<\/li>\n<li>Object.prototype sits at the top of the chain.All prototypes receive their methods and properties from the Object.prototype.<\/li>\n<li>An object&#8217;s blueprint is called a prototype. Even if the properties and methods are absent from the current object, we may still utilise the prototype to apply properties and methods to an object.<\/li>\n<\/ul>\n<section id=\"types-of-errors\" class=\"ibpage-article-header\">\n<h5><strong>Q. Explain the types of errors in javascript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> There are two different kinds of javascript errors.<\/p>\n<ul>\n<li>Syntax errors: Syntax errors are typos or spelling issues in the code that result in the programme not starting at all or stopping midway through. Typically, error messages are also provided.<\/li>\n<li>Logical error: When the grammar is correct but the logic or programme is flawed, reasoning errors take place. In this instance, the application runs without any issues. The output findings, however, are unreliable. Since many programmes do not indicate errors for logic errors, these can occasionally be harder to fix than syntactic problems.<\/li>\n<\/ul>\n<\/article>\n<\/section>\n<section id=\"memoization\" class=\"ibpage-article-header\">\n<h5><strong>Q. Define memoization?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Memoization is a type of caching in which a function&#8217;s return result is stored in a cache according to its inputs. The function&#8217;s cached version is returned if the function&#8217;s parameter remains unchanged.<\/p>\n<h5><strong>Q. What is DOM?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li>The acronym for Document Object Model is DOM. A programming interface used for HTML and XML documents is called DOM.<\/li>\n<li>The browser builds an object known as DOM based on the HTML document when it attempts to render an HTML document. We can alter or modify different HTML document elements by using this DOM.<\/li>\n<\/ul>\n<article class=\"ibpage-article\">\n<h5><strong>Q. Explain rest parameter and spread operator?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<article class=\"ibpage-article\"><strong>Rest parameter ( \u2026 ):<\/strong><\/article>\n<article class=\"ibpage-article\">\n<ul>\n<li>It offers a better method for managing a function&#8217;s parameters.<\/li>\n<li>We can write functions that can accept a variable number of arguments by using the rest parameter syntax.<\/li>\n<li>The remainder parameter will turn any number of inputs into an array.<\/li>\n<li>Additionally, it aids in extracting certain or all of the arguments.<\/li>\n<li>Three dots (&#8230;) can be placed before the parameters to use the rest of the parameters.<\/li>\n<\/ul>\n<p><strong>Spread operator (\u2026):\u00a0<\/strong><\/p>\n<p>The spread operator is used to spread an array and object literals, even though its syntax is precisely the same as that of the remainder parameter. When one or more parameters are anticipated in a function call, we also employ spread operators.<\/p>\n<h5><strong>Q. Define the use of promises in javascript?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> In JavaScript, asynchronous operations are managed by promises. Asynchronous activities were handled by callbacks prior to promises. However, employing many callbacks to handle asynchronous work can result in unmanageable code because of the limited capabilities of callbacks.There are four states for a promise object.<\/p>\n<\/article>\n<\/article>\n<\/article>\n<\/section>\n<\/article>\n<\/article>\n<\/section>\n<article class=\"ibpage-article\">\n<ul>\n<li>Pending: A preliminary assurance. This condition indicates that the pledge is still pending and has not yet been accepted or rejected.<\/li>\n<li>Fulfilled: This state indicates that the async process has finished and that the promise has been met.<\/li>\n<li>Rejected: This state indicates that the async action failed because the promise was rejected for whatever reason.<\/li>\n<li>Settled: This indicates that the pledge has either been accepted or denied.<\/li>\n<\/ul>\n<p style=\"text-align: center\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\" target=\"_blank\" rel=\"noopener\">Experience the power of our python programming course with a free demo \u2013 enroll now!<\/a><\/strong><\/p>\n<section id=\"explain-weakset\" class=\"ibpage-article-header\">\n<h5><strong>Q. What is WeakSet in javascript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> A set is an ordered collection of distinct elements in JavaScript. WeakSet is a collection of distinct and arranged elements, similar to Set, but with a few important distinctions:<\/p>\n<ul>\n<li>Weakset is made up entirely of objects.<\/li>\n<li>There is a weak reference to an object inside the weakset. This implies that an object within the weakset will be trash collected if it lacks a reference.<\/li>\n<li>WeakSet only provides three methods\u2014add(), delete(), and has()\u2014in contrast to Set&#8217;s nine.<\/li>\n<\/ul>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-keyword\">const<\/span> newSet = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Set<\/span>([2, 4, <span class=\"hljs-number\">6<\/span>, 8]);\r\n<span class=\"hljs-built_in\">console<\/span>.log(newSet);<span class=\"hljs-comment\">\/\/ Outputs Set {2,4,6,8}<\/span>\r\n\r\n<span class=\"hljs-keyword\">const<\/span> newSet1 = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">WeakSet<\/span>([1, 2, 3]); <span class=\"hljs-comment\">\/\/Throws an error<\/span>\r\n\r\n\r\n<span class=\"hljs-keyword\">let<\/span> obj1 = {<span class=\"hljs-attr\">message<\/span>:<span class=\"hljs-string\">\"Entri App\"<\/span>};\r\n<span class=\"hljs-keyword\">const<\/span> newSet2 = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">WeakSet<\/span>([obj1]);\r\n<span class=\"hljs-built_in\">console<\/span>.log(newSet2.has(obj2)); <span class=\"hljs-comment\">\/\/ true<\/span><\/code><\/pre>\n<\/article>\n<\/section>\n<section id=\"why-do-we-use-callbacks\" class=\"ibpage-article-header\">\n<h5><strong>Q. Usage of callbacks?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li class=\"ibpage-article\">A callback function is a method that is executed inside of another function (let&#8217;s call it &#8220;thisFunction&#8221;) after the function has finished running. It is supplied as an input to this other function.The programming language JavaScript is event-based.<\/li>\n<li class=\"ibpage-article\">JavaScript won&#8217;t pause to wait for a response; instead, it will keep running and watch for more events. Callbacks are a way to make sure that a code doesn&#8217;t start until after another code has finished running.<\/li>\n<\/ul>\n<\/section>\n<section id=\"explain-weakmap\" class=\"ibpage-article-header\">\n<h5><strong>Q. What is WeakMap in javascript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Map is used in JavaScript to store key-value pairs. There are two types of key-value pairs: primitive and non-primitive. There are some significant distinctions between Map and WeakMap.<\/p>\n<ul>\n<li>In a weakmap, an object should always be the keys and values.<\/li>\n<li>The item will be gathered as trash if there are no references to it.<\/li>\n<\/ul>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-keyword\">const<\/span> map0 = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Map<\/span>();\r\nmap0.set(<span class=\"hljs-string\">'Value'<\/span>, 2);\r\n\r\n<span class=\"hljs-keyword\">const<\/span> map1 = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">WeakMap<\/span>();\r\nmap1.set(<span class=\"hljs-string\">'Value'<\/span>, 3<span class=\"hljs-number\">.4<\/span>); <span class=\"hljs-comment\">\/\/ Throws an error<\/span>\r\n\r\n<span class=\"hljs-keyword\">let<\/span> obj = {<span class=\"hljs-attr\">name<\/span>:<span class=\"hljs-string\">\"Alice\"<\/span>};\r\n<span class=\"hljs-keyword\">const<\/span> map2 = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">WeakMap<\/span>();\r\nmap2.set(obj, {<span class=\"hljs-attr\">age<\/span>:20});<\/code><\/pre>\n<\/article>\n<\/section>\n<section id=\"object-destructuring\" class=\"ibpage-article-header\">\n<h5><strong>Q. Define Object Destructuring in Javascript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> The new method of extracting elements from an object or array is called object destructuring.<\/p>\n<ul>\n<li><strong>Object destructuring:\u00a0<\/strong><\/li>\n<\/ul>\n<pre><code class=\"language-javascript hljs\"><span class=\"hljs-keyword\">const<\/span> classRoom = {\r\n  <span class=\"hljs-attr\">strength<\/span>: <span class=\"hljs-number\">20<\/span>,\r\n  <span class=\"hljs-attr\">benches<\/span>: <span class=\"hljs-number\">33<\/span>,\r\n  <span class=\"hljs-attr\">blackBoard<\/span>:2 }\r\n\r\n<span class=\"hljs-keyword\">const<\/span> classStrength = classRoom.strength;\r\n<span class=\"hljs-keyword\">const<\/span> classBenches = classRoom.benches;\r\n<span class=\"hljs-keyword\">const<\/span> classBlackBoard = classRoom.blackBoard;<\/code><\/pre>\n<\/article>\n<\/section>\n<\/article>\n<h5><strong>Q. Write down the differences between prototypal and classical inheritance?<\/strong><\/h5>\n<p><strong>Answer:<\/strong><\/p>\n<ul>\n<li class=\"ibpage-article\">In classic OO programming, programmers create objects, which are representations of real-time entities. The two categories of abstractions are classes and objects.<\/li>\n<li class=\"ibpage-article\">An object is an abstraction of a real entity, while a class is a generalisation of an object. For instance, a vehicle is a car&#8217;s speciality. Cars (class) are hence descended from vehicles (object).<\/li>\n<li class=\"ibpage-article\">In contrast to prototypal inheritance, which permits any object to be duplicated via an object linking technique, classical inheritance is limited to classes that inherit from those surviving classes. Not to get too technical, but a prototype basically acts as a model for those other objects, whether or not they extend the parent object.<\/li>\n<\/ul>\n<h5><strong>Q. What is JavaScript Design Patterns?<\/strong><\/h5>\n<section id=\"javascript-design-patterns\" class=\"ibpage-article-header\">\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> When creating JavaScript browser apps, mistakes might occasionally happen. JavaScript design patterns are reusable solutions for these situations. They really help us improve the stability of our code.<\/p>\n<ul>\n<li><strong>JavaScript Creational Design Pattern:<\/strong> This pattern addresses the object generation mechanism. Their goal is to create objects that fit into a specific situation.<\/li>\n<li><strong>JavaScript Structural Design Pattern:<\/strong> This pattern describes how to build larger frameworks by combining the classes and objects we have produced thus far. This pattern defines a simple method for establishing relationships between things, which facilitates the process.<\/li>\n<li><strong>Behavioural Design Pattern:<\/strong> This design pattern illustrates common JavaScript communication patterns between objects. The communication can proceed with more flexibility as a result.<\/li>\n<\/ul>\n<\/article>\n<\/section>\n<section id=\"is-javascript-a-pass-by-reference-or-pass-by-value-language\" class=\"ibpage-article-header\">\n<h5><strong>Q. Which language is JavaScript\u2014pass-by-value or pass-by-reference?<\/strong><\/h5>\n<p><strong>Answer:<\/strong> Because the data in the variable is always a reference to objects, it is always pass by value. Consequently, if you supply an object and modify any of its members within the method, the modifications persist outside of it.<\/p>\n<p>In this instance, it seems to be pass by reference. It is clear that it is supplied by value since if you change the values of the object variable, the change will not be retained.<\/p>\n<\/section>\n<section id=\"asynch-await-vs-generators-usage-to-acheive-the-same-functionality\" class=\"ibpage-article-header\">\n<h5><strong>Q. Variations in how generators and async\/await are used to accomplish the same task.<\/strong><\/h5>\n<p><strong>Answer: <\/strong><\/p>\n<ul>\n<li>Async-await functions are executed sequentially, one after the other, whereas generator functions are run by their generator yield by yield, or one output at a time.<\/li>\n<li>A specific use case for Generators is made easier to implement by async\/await.<\/li>\n<li>The Generator function consistently yields the value X and the done result is Boolean; nevertheless, the Async function consistently returns an error or an assurance.<\/li>\n<\/ul>\n<\/section>\n<section id=\"primitive-data-types\" class=\"ibpage-article-header\">\n<h5><strong>Q. Define the primitive data types in JavaScript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> A data type that doesn&#8217;t consist of other data types is called a primitive. One value can only be shown at a time by it. Every primitive is a built-in data type by definition (the compiler needs to be aware of them). However, not every pre-installed dataset is rudimentary. There are five different types of fundamental data in JavaScript. The values listed below are accessible:<\/p>\n<ul>\n<li>Boolean<\/li>\n<li>Undefined<\/li>\n<li>Null<\/li>\n<li>Number<\/li>\n<li>String<\/li>\n<\/ul>\n<\/article>\n<\/section>\n<section id=\"role-of-deferred-scripts-in-javascript\" class=\"ibpage-article-header\">\n<h5><strong>Q. Explain the role of deferred scripts in JavaScript?<\/strong><\/h5>\n<article class=\"ibpage-article\"><strong>Answer:<\/strong> Until the script hasn&#8217;t stopped, HTML code processing during page loads is by default disabled. If the script is very heavy or your network is a little slow, it will affect your page. When you use Deferred, the script executes after waiting for the HTML parser to complete. This speeds up the loading of online pages, making them appear more rapidly.<\/article>\n<article>\n<p style=\"text-align: center\"><strong><a href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\" target=\"_blank\" rel=\"noopener\">\u00a0Learn Full Stack Development with expert mentors! Get Free Demo Here!<\/a><\/strong><\/p>\n<\/article>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>An open-source programming language is JavaScript. It is intended for use in the development of web-based apps. It is substantially faster than other languages because it is interpreted and lightweight. Because JavaScript and HTML are interwoven, using JavaScript in online applications is much simpler. The core idea of the programming paradigm known as &#8220;Object-Oriented Programming,&#8221; [&hellip;]<\/p>\n","protected":false},"author":100,"featured_media":25584013,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1926],"tags":[],"class_list":["post-25583926","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-full-stack-web-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Javascript OOPs Interview Questions [2024] - Entri Blog<\/title>\n<meta name=\"description\" content=\"&quot;Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Javascript OOPs Interview Questions [2024] - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"&quot;Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-21T17:57:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-23T18:35:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sabira Ulfath\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sabira Ulfath\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\"},\"author\":{\"name\":\"Sabira Ulfath\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/c79ea15b3ee5dab855ebea929c9a6046\"},\"headline\":\"Javascript OOPs Interview Questions [2024]\",\"datePublished\":\"2024-05-21T17:57:09+00:00\",\"dateModified\":\"2024-05-23T18:35:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\"},\"wordCount\":3027,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp\",\"articleSection\":[\"Articles\",\"Full Stack Web Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\",\"url\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\",\"name\":\"Javascript OOPs Interview Questions [2024] - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp\",\"datePublished\":\"2024-05-21T17:57:09+00:00\",\"dateModified\":\"2024-05-23T18:35:48+00:00\",\"description\":\"\\\"Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp\",\"width\":820,\"height\":615,\"caption\":\"Javascript OOPs Interview Questions [2024]\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Full Stack Web Development\",\"item\":\"https:\/\/entri.app\/blog\/category\/full-stack-web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Javascript OOPs Interview Questions [2024]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/c79ea15b3ee5dab855ebea929c9a6046\",\"name\":\"Sabira Ulfath\",\"url\":\"https:\/\/entri.app\/blog\/author\/sabira\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Javascript OOPs Interview Questions [2024] - Entri Blog","description":"\"Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.","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:\/\/entri.app\/blog\/javascript-oops-interview-question\/","og_locale":"en_US","og_type":"article","og_title":"Javascript OOPs Interview Questions [2024] - Entri Blog","og_description":"\"Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.","og_url":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2024-05-21T17:57:09+00:00","article_modified_time":"2024-05-23T18:35:48+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp","type":"image\/webp"}],"author":"Sabira Ulfath","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Sabira Ulfath","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/"},"author":{"name":"Sabira Ulfath","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/c79ea15b3ee5dab855ebea929c9a6046"},"headline":"Javascript OOPs Interview Questions [2024]","datePublished":"2024-05-21T17:57:09+00:00","dateModified":"2024-05-23T18:35:48+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/"},"wordCount":3027,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp","articleSection":["Articles","Full Stack Web Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/","url":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/","name":"Javascript OOPs Interview Questions [2024] - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp","datePublished":"2024-05-21T17:57:09+00:00","dateModified":"2024-05-23T18:35:48+00:00","description":"\"Master your JavaScript OOPs interview with our updated 2024 guide. Explore essential object-oriented programming questions.","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/javascript-oops-interview-question\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2024\/05\/Javascript-OOPs-Interview-Questions-1.webp","width":820,"height":615,"caption":"Javascript OOPs Interview Questions [2024]"},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/javascript-oops-interview-question\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Full Stack Web Development","item":"https:\/\/entri.app\/blog\/category\/full-stack-web-development\/"},{"@type":"ListItem","position":3,"name":"Javascript OOPs Interview Questions [2024]"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/c79ea15b3ee5dab855ebea929c9a6046","name":"Sabira Ulfath","url":"https:\/\/entri.app\/blog\/author\/sabira\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25583926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25583926"}],"version-history":[{"count":7,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25583926\/revisions"}],"predecessor-version":[{"id":25584299,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25583926\/revisions\/25584299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25584013"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25583926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25583926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25583926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}