js interview which is, Schemes and Mind Maps of Computer Science

This is the course for js devlopment

Typology: Schemes and Mind Maps

2021/2022

Uploaded on 06/19/2023

jeevan-neupane
jeevan-neupane 🇳🇵

1 document

1 / 176

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
26/4/2021
md2pdf - Markdown to PDF
https://md2pdf.netlify.app
1/176
Hello World! Today I prepared a huge list of Javascript Interview Questions from this awesome repo,
their really cool and have lots of this kind of resources.
Giveaway
We are giving away any course you need on Udemy. Any price any course. Steps to enter the
giveaway
--> React to this post
--> Subscribe to our Newsletter <-- Very important
--> Extra: Join us at Discord to participate in our next events
Extra --> For beginners:
What is JS (Javascript)
JavaScript is a scripting or programming language that allows you to implement complex
features on web pages — every time a web page does more than just sit there and display static
information for you to look at — displaying timely content updates, interactive maps, animated
2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably
involved. It is the third layer of the layer cake of standard web technologies. MDN
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download js interview which is and more Schemes and Mind Maps Computer Science in PDF only on Docsity!

Hello World! Today I prepared a huge list of Javascript Interview Questions from this awesome repo, their really cool and have lots of this kind of resources. ⚡ Giveaway ⚡ We are giving away any course you need on Udemy. Any price any course. Steps to enter the giveaway --> React to this post --> Subscribe to our Newsletter <-- Very important --> Extra: Join us at Discord to participate in our next events Extra --> For beginners:

What is JS (Javascript)

JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies. MDN

What it used for?

To put things simply, JavaScript is an object orient programming language designed to make web development easier and more attractive. In most cases, JavaScript is used to create responsive, interactive elements for web pages, enhancing the user experience. Things like menus, animations, video players, interactive maps, and even simple in-browser games can be created quickly and easily with JavaScript. JavaScript is one of the most popular programming languages in the world. BitDegree - What Is JavaScript Used For And Why You Should Learn It

Hello World In Javascript:

Resources to learn it:

Mozilla’s JavaScript Guide JavaScript track on Codecademy: Interactive tutorials for beginners. JavaScript for Cats by Max Ogden Eloquent JavaScript by Marijn Haverbeke Wikibooks’ JavaScript book JavaScript Lectures by Douglas Crockford You Don't Know JS - Possibly the best book written on modern JavaScript, completely readable online for free, or can be bought to support the author. braziljs/js-the-right-way - An easy-to-read, quick reference for JS best practices, accepted coding standards, and links around the Web. JSbooks - Directory of free JavaScript ebooks. Superhero.js - A collection of resources about creating, testing and maintaining a large JavaScript code base. SJSJ - Simplified JavaScript Jargon is a community-driven attempt at explaining the loads of buzzwords making the current JavaScript ecosystem in a few simple words. How to Write an Open Source JavaScript Library - A comprehensive guide through a set of steps to publish a JavaScript open source library. JavaScript Tutorials - Learn Javascript online from a diverse range of user ranked online tutorials. Functional-Light JavaScript - Pragmatic, balanced FP in JavaScript. Clean Code JavaScript - Clean Code concepts adapted for JavaScript. List at GitHub - Awesome Javascript - By Alexandru Gherasim

At Reddit - What 10 Things Should a Serious Javascript Developer Know Right

Now?

Scope. If you don't understand this intimately then you aren't that serious about this language. This is the number one point intentionally and I cannot stress it enough. Architecture. You don't have to be a master software architect, but if you cannot perform some basic planning and put pieces together without massive layers of tooling you are an imposter. alert("Hello World") — Output data in an alert box in the browser window confirm("Hello World") — Opens up a yes/no dialog and returns true/false depending on user cli console.log("Hello World") — Writes information to the browser console, good for debugging pur document.write("Hello World") — Write directly to the HTML document prompt("Remember the like!") — Creates a dialogue for user input

Source Table of Contents: No. Questions 1 What are the possible ways to create objects in JavaScript 2 What is prototype chain 3 What is the difference between Call, Apply and Bind 4 What is JSON and its common operations 5 What is the purpose of the array slice method 6 What is the purpose of the array splice method 7 What is the difference between slice and splice 8 How do you compare Object and Map 9 What is the difference between == and === operators 10 What are lambda or arrow functions 11 What is a first class function 12 What is a first order function 13 What is a higher order function 14 What is a unary function

No. Questions 15 What is the currying function 16 What is a pure function 17 What is the purpose of the let keyword 18 What is the difference between let and var 19 What is the reason to choose the name let as a keyword 20 How do you redeclare variables in switch block without an error 21 What is the Temporal Dead Zone 22 What is IIFE(Immediately Invoked Function Expression) 23 What is the benefit of using modules 24 What is memoization 25 What is Hoisting 26 What are classes in ES 27 What are closures 28 What are modules 29 Why do you need modules 30 What is scope in javascript 31 What is a service worker 32 How do you manipulate DOM using a service worker 33 How do you reuse information across service worker restarts 34 What is IndexedDB 35 What is web storage 36 What is a post message 37 What is a cookie 38 Why do you need a Cookie 39 What are the options in a cookie 40 How do you delete a cookie 41 What are the differences between cookie, local storage and session storage

No. Questions 69 What is the purpose of double exclamation 70 What is the purpose of delete operator 71 What is typeof operator 72 What is undefined property 73 What is null value 74 What is the difference between null and undefined 75 What is eval 76 What is the difference between window and document 77 How do you access history in javascript 78 How do you detect caps lock key turned on or not 79 What is isNaN 80 What are the differences between undeclared and undefined variables 81 What are global variables 82 What are the problems with global variables 83 What is NaN property 84 What is the purpose of isFinite function 85 What is an event flow 86 What is event bubbling 87 What is event capturing 88 How do you submit a form using JavaScript 89 How do you find operating system details 90 What is the difference between document load and DOMContentLoaded events 91 What is the difference between native, host and user objects 92 What are the tools or techniques used for debugging JavaScript code 93 What are the pros and cons of promises over callbacks 94 What is the difference between an attribute and a property 95 What is same-origin policy

No. Questions 96 What is the purpose of void 0 97 Is JavaScript a compiled or interpreted language 98 Is JavaScript a case-sensitive language 99 Is there any relation between Java and JavaScript 100 What are events 101 Who created javascript 102 What is the use of preventDefault method 103 What is the use of stopPropagation method 104 What are the steps involved in return false 105 What is BOM 106 What is the use of setTimeout 107 What is the use of setInterval 108 Why is JavaScript treated as Single threaded 109 What is an event delegation 110 What is ECMAScript 111 What is JSON 112 What are the syntax rules of JSON 113 What is the purpose JSON stringify 114 How do you parse JSON string 115 Why do you need JSON 116 What are PWAs 117 What is the purpose of clearTimeout method 118 What is the purpose of clearInterval method 119 How do you redirect new page in javascript 120 How do you check whether a string contains a substring 121 How do you validate an email in javascript 122 How do you get the current url with javascript

No. Questions 150 Can you write a random integers function to print integers with in a range 151 What is tree shaking 152 What is the need of tree shaking 153 Is it recommended to use eval 154 What is a Regular Expression 155 What are the string methods available in Regular expression 156 What are modifiers in regular expression 157 What are regular expression patterns 158 What is a RegExp object 159 How do you search a string for a pattern 160 What is the purpose of exec method 161 How do you change style of a HTML element 162 What would be the result of 1+2+'3' 163 What is a debugger statement 164 What is the purpose of breakpoints in debugging 165 Can I use reserved words as identifiers 166 How do you detect a mobile browser 167 How do you detect a mobile browser without regexp 168 How do you get the image width and height using JS 169 How do you make synchronous HTTP request 170 How do you make asynchronous HTTP request 171 How do you convert date to another timezone in javascript 172 What are the properties used to get size of window 173 What is a conditional operator in javascript 174 Can you apply chaining on conditional operator 175 What are the ways to execute javascript after page load 176 What is the difference between proto and prototype

No. Questions 177 Give an example where do you really need semicolon 178 What is a freeze method 179 What is the purpose of freeze method 180 Why do I need to use freeze method 181 How do you detect a browser language preference 182 How to convert string to title case with javascript 183 How do you detect javascript disabled in the page 184 What are various operators supported by javascript 185 What is a rest parameter 186 What happens if you do not use rest parameter as a last argument 187 What are the bitwise operators available in javascript 188 What is a spread operator 189 How do you determine whether object is frozen or not 190 How do you determine two values same or not using object 191 What is the purpose of using object is method 192 How do you copy properties from one object to other 193 What are the applications of assign method 194 What is a proxy object 195 What is the purpose of seal method 196 What are the applications of seal method 197 What are the differences between freeze and seal methods 198 How do you determine if an object is sealed or not 199 How do you get enumerable key and value pairs 200 What is the main difference between Object.values and Object.entries method 201 How can you get the list of keys of any object 202 How do you create an object with prototype 203 What is a WeakSet

No. Questions 231 What is nodejs 232 What is an Intl object 233 How do you perform language specific date and time formatting 234 What is an Iterator 235 How does synchronous iteration works 236 What is an event loop 237 What is call stack 238 What is an event queue 239 What is a decorator 240 What are the properties of Intl object 241 What is an Unary operator 242 How do you sort elements in an array 243 What is the purpose of compareFunction while sorting arrays 244 How do you reversing an array 245 How do you find min and max value in an array 246 How do you find min and max values without Math functions 247 What is an empty statement and purpose of it 248 How do you get meta data of a module 249 What is a comma operator 250 What is the advantage of a comma operator 251 What is typescript 252 What are the differences between javascript and typescript 253 What are the advantages of typescript over javascript 254 What is an object initializer 255 What is a constructor method 256 What happens if you write constructor more than once in a class 257 How do you call the constructor of a parent class

No. Questions 258 How do you get the prototype of an object 259 What happens If I pass string type for getPrototype method 260 How do you set prototype of one object to another 261 How do you check whether an object can be extendable or not 262 How do you prevent an object to extend 263 What are the different ways to make an object non-extensible 264 How do you define multiple properties on an object 265 What is MEAN in javascript 266 What Is Obfuscation in javascript 267 Why do you need Obfuscation 268 What is Minification 269 What are the advantages of minification 270 What are the differences between Obfuscation and Encryption 271 What are the common tools used for minification 272 How do you perform form validation using javascript 273 How do you perform form validation without javascript 274 What are the DOM methods available for constraint validation 275 What are the available constraint validation DOM properties 276 What are the list of validity properties 277 Give an example usage of rangeOverflow property 278 Is enums feature available in javascript 279 What is an enum 280 How do you list all properties of an object 281 How do you get property descriptors of an object 282 What are the attributes provided by a property descriptor 283 How do you extend classes 284 How do I modify the url without reloading the page

No. Questions 312 What are tagged templates 313 What are raw strings 314 What is destructuring assignment 315 What are default values in destructuring assignment 316 How do you swap variables in destructuring assignment 317 What are enhanced object literals 318 What are dynamic imports 319 What are the use cases for dynamic imports 320 What are typed arrays 321 What are the advantages of module loaders 322 What is collation 323 What is for...of statement 324 What is the output of below spread operator array 325 Is PostMessage secure 326 What are the problems with postmessage target origin as wildcard 327 How do you avoid receiving postMessages from attackers 328 Can I avoid using postMessages completely 329 Is postMessages synchronous 330 What paradigm is Javascript 331 What is the difference between internal and external javascript 332 Is JavaScript faster than server side script 333 How do you get the status of a checkbox 334 What is the purpose of double tilde operator 335 How do you convert character to ASCII code 336 What is ArrayBuffer 337 What is the output of below string expression 338 What is the purpose of Error object

No. Questions 339 What is the purpose of EvalError object 340 What are the list of cases error thrown from non-strict mode to strict mode 341 Is all objects have prototypes 342 What is the difference between a parameter and an argument 343 What is the purpose of some method in arrays 344 How do you combine two or more arrays 345 What is the difference between Shallow and Deep copy 346 How do you create specific number of copies of a string 347 How do you return all matching strings against a regular expression 348 How do you trim a string at the beginning or ending 349 What is the output of below console statement with unary operator 350 Does javascript uses mixins 351 What is a thunk function 352 What are asynchronous thunks 353 What is the output of below function calls 354 How to remove all line breaks from a string 355 What is the difference between reflow and repaint 356 What happens with negating an array 357 What happens if we add two arrays 358 What is the output of prepend additive operator on falsy values 359 How do you create self string using special characters 360 How do you remove falsy values from an array 361 How do you get unique values of an array 362 What is destructuring aliases 363 How do you map the array values without using map method 364 How do you empty an array 365 How do you rounding numbers to certain decimals

No. Questions 393 What is heap 394 What is an event table 395 What is a microTask queue 396 What is the difference between shim and polyfill 397 How do you detect primitive or non primitive value type 398 What is babel 399 Is Node.js completely single threaded 400 What are the common use cases of observables 401 What is RxJS 402 What is the difference between Function constructor and function declaration 403 What is a Short circuit condition 404 What is the easiest way to resize an array 405 What is an observable 406 What is the difference between function and class declarations 407 What is an async function 408 How do you prevent promises swallowing errors 409 What is deno 410 How do you make an object iterable in javascript 411 What is a Proper Tail Call 412 How do you check an object is a promise or not 413 How to detect if a function is called as constructor 414 What are the differences between arguments object and rest parameter 415 What are the differences between spread operator and rest parameter 416 What are the different kinds of generators 417 What are the built-in iterables 418 What are the differences between for...of and for...in statements 419 How do you define instance and non-instance properties

No. Questions 420 What is the difference between isNaN and Number.isNaN? 421 How to invoke an IIFE without any extra brackets? 422 Is that possible to use expressions in switch cases? 423 What is the easiest way to ignore promise errors? 424 How do style the console output using CSS?

Questions:

1. What are the possible ways to create objects in JavaScript

There are many ways to create objects in javascript as below i. Object constructor: The simplest way to create an empty object is using the Object constructor. Currently this approach is not recommended. var object = new Object(); ii. Object's create method: The create method of Object creates a new object by passing the prototype object as a parameter var object = Object.create(null); iii. Object literal syntax: The object literal syntax is equivalent to create method when it passes null as parameter var object = {}; iv. Function constructor: Create any function and apply the new operator to create object instances, function Person(name){ var object = {};