DevPro
Practice Questions
Questions
Can you offer a use case for the new arrow => function syntax?
Javascript
Explain AJAX in as much detail as possible
Javascript
Network
Explain the difference between mutable and immutable objects in JavaScript
Javascript
Explain the differences between CommonJS modules and ES modules in JavaScript
Javascript
Explain what a single page app is and how to make one SEO-friendly
Javascript
Html
How do you abort a web request using `AbortController` in JavaScript?
Javascript
Network
How does JavaScript garbage collection work?
Javascript
What are iterators and generators in JavaScript and what are they used for?
Javascript
What are JavaScript object getters and setters for?
Javascript
What are JavaScript object property flags and descriptors?
Javascript
What are JavaScript polyfills for?
Javascript
What are server-sent events?
Javascript
What are `Symbol`s used for in JavaScript?
Javascript
What are the advantages and disadvantages of using AJAX?
Javascript
Network
What are the differences between `Map`/`Set` and `WeakMap`/`WeakSet` in JavaScript?
Javascript
What are the differences between `XMLHttpRequest` and `fetch()` in JavaScript and browsers?
Javascript
Network
What are workers in JavaScript used for?
Javascript
What is the difference between a `Map` object and a plain object in JavaScript?
Javascript
What is `'use strict';` in JavaScript for?
Javascript
What's the difference between an "attribute" and a "property" in the DOM?
Javascript
Html
Why is extending built-in JavaScript objects not a good idea?
Javascript
Why is it, in general, a good idea to leave the global JavaScript scope of a website as-is and never touch it?
Javascript
Why might you want to create static class members in JavaScript?
Javascript
Difference between document `load` event and document `DOMContentLoaded` event?
Javascript
Html
Explain how JSONP works (and how it's not really Ajax)
Javascript
Network
Security
Explain the concept of a callback function in asynchronous operations
Javascript
Explain the concept of a microtask queue
Javascript
Explain the concept of caching and how it can be used to improve performance
Javascript
Performance
Explain the concept of code coverage and how it can be used to assess test quality
Javascript
Testing
Explain the concept of Content Security Policy (CSP) and how it enhances security
Javascript
Security
Explain the concept of Cross-Site Request Forgery (CSRF) and its mitigation techniques
Javascript
Network
Security
Explain the concept of debouncing and throttling
Javascript
Performance
Explain the concept of destructuring assignment for objects and arrays
Javascript
Explain the concept of error propagation in JavaScript
Javascript
Explain the concept of hoisting with regards to functions
Javascript
Explain the concept of inheritance in ES2015 classes
Javascript
Explain the concept of input validation and its importance in security
Javascript
Security
Explain the concept of lazy loading and how it can improve performance
Javascript
Performance
Explain the concept of lexical scoping
Javascript
Explain the concept of partial application
Javascript
Explain the concept of scope in JavaScript
Javascript
Explain the concept of tagged templates
Javascript
Explain the concept of test-driven development (TDD)
Javascript
Testing
Explain the concept of the Prototype pattern
Javascript
Explain the concept of the Singleton pattern
Javascript
Explain the concept of the spread operator and its uses
Javascript
Explain the concept of the Strategy pattern
Javascript
Explain the concept of the Web Socket API
Javascript
Network
Explain the concept of `this` binding in event handlers
Javascript
Explain the concept of tree shaking in module bundling
Javascript
Explain the difference between classical inheritance and prototypal inheritance
Javascript
Explain the difference between `document.querySelector()` and `document.getElementById()`
Javascript
Html
Explain the difference between dot notation and bracket notation for accessing object properties
Javascript
Explain the difference between global scope, function scope, and block scope
Javascript
Explain the difference between shallow copy and deep copy
Javascript
Explain the difference between unit testing, integration testing, and end-to-end testing
Javascript
Testing
Explain the difference in hoisting between `var`, `let`, and `const`
Javascript
Explain the different states of a Promise
Javascript
Explain the different ways the `this` keyword can be bound
Javascript
Explain the event phases in a browser
Javascript
Explain the Observer pattern and its use cases
Javascript
Explain the same-origin policy with regards to JavaScript
Javascript
Network
Security
Explain why the following doesn't work as an IIFE: `function foo(){}();`. What needs to be changed to properly make it an IIFE?
Javascript
How can closures be used to create private variables?
Javascript
How can you avoid problems related to hoisting?
Javascript
How can you create custom error objects?
Javascript
How can you implement secure authentication and authorization in JavaScript applications?
Javascript
Security
How can you optimize DOM manipulation for better performance?
Javascript
Performance
How can you optimize network requests for better performance?
Javascript
Performance
How can you prevent clickjacking attacks?
Javascript
Security
How can you prevent SQL injection vulnerabilities in JavaScript applications?
Javascript
Security
How can you share code between JavaScript files?
Javascript
How can you test asynchronous code in JavaScript?
Javascript
Testing
How do currying and partial application differ from each other?
Javascript
How do `<iframe>` on a page communicate?
Javascript
Html
How do `Set`s and `Map`s handle equality checks for objects?
Javascript
How do you access the index of an element in an array during iteration?
Javascript
How do you add, remove, and modify HTML elements using JavaScript?
Javascript
Html
How do you add, remove, and update elements in an array?
Javascript
How do you check if an object has a specific property?
Javascript
How do you check the data type of a variable?
Javascript
How do you convert a `Set` to an array in JavaScript?
Javascript
How do you convert a string to a number in JavaScript?
Javascript
How do you create a constructor function?
Javascript
How do you detect if JavaScript is disabled on a page?
Javascript
How do you get the query string values of the current page in JavaScript?
Javascript
How do you handle errors in asynchronous operations?
Javascript
How do you handle errors using `try...catch` blocks?
Javascript
How do you import and export modules in JavaScript?
Javascript
How do you make an HTTP request using the Fetch API?
Javascript
Network
How do you manipulate CSS styles using JavaScript?
Javascript
Css
How do you organize your code?
Javascript
How do you prevent the default behavior of an event?
Javascript
How do you redirect to a new page in JavaScript?
Javascript
How do you reliably determine whether an object is empty?
Javascript
How do you use `window.history` API?
Javascript
How do you validate form elements using the Constraint Validation API?
Javascript
How do you write unit tests for JavaScript code?
Javascript
Testing
How does hoisting affect function declarations and expressions?
Javascript
How is `Promise.all()` different from `Promise.allSettled()`?
Javascript
Provide some examples of how currying and partial application can be used
Javascript
What are callback functions and how are they used?
Javascript
What are default parameters and how are they used?
Javascript
What are design patterns and why are they useful?
Javascript
What are event listeners and how are they used?
Javascript
What are mocks and stubs and how are they used in testing?
Javascript
Testing
What are modules and why are they useful?
Javascript
What are Progressive Web Applications (PWAs)?
Javascript
What are Promises and how do they work?
Javascript
What are proxies in JavaScript used for?
Javascript
What are rest parameters and how are they used?
Javascript
What are `Set`s and `Map`s and how are they used?
Javascript
What are some best practices for handling sensitive data in JavaScript?
Javascript
Security
What are some best practices for writing maintainable and effective tests in JavaScript?
Javascript
Testing
What are some common performance bottlenecks in JavaScript applications?
Javascript
Performance
What are some common security headers and their purpose?
Javascript
Security
What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?
Javascript
What are some popular JavaScript testing frameworks?
Javascript
Testing
What are some techniques for reducing reflows and repaints?
Javascript
Performance
What are some tools and techniques for identifying security vulnerabilities in JavaScript code?
Javascript
Security
What are some tools that can be used for JavaScript testing?
Javascript
Testing
What are some tools that can be used to measure and analyze JavaScript performance?
Javascript
Performance
What are template literals and how are they used?
Javascript
What are the advantages of using the spread operator with arrays and objects?
Javascript
What are the benefits of using a module bundler?
Javascript
What are the benefits of using currying and partial application?
Javascript
What are the benefits of using spread syntax in JavaScript and how is it different from rest syntax?
Javascript
What are the common pitfalls of using the `this` keyword?
Javascript
What are the different methods for iterating over an array?
Javascript
What are the different types of errors in JavaScript?
Javascript
What are the different types of testing in software development?
Javascript
Testing
What are the different ways to copy an object or an array?
Javascript
What are the different ways to make an API call in JavaScript?
Javascript
Network
What are the metadata fields of a module?
Javascript
What are the potential issues caused by hoisting?
Javascript
What are the potential pitfalls of using closures?
Javascript
What are the various data types in JavaScript?
Javascript
What are Web Workers and how can they be used to improve performance?
Javascript
Performance
What do you think of AMD vs CommonJS?
Javascript
What is async/await and how does it simplify asynchronous code?
Javascript
What is Cross-Site Scripting (XSS) and how can you prevent it?
Javascript
Security
What is currying and how does it work?
Javascript
What is `Object.freeze()` for?
Javascript
What is `Object.preventExtensions()` for?
Javascript
What is `Object.seal()` for?
Javascript
What is recursion and how is it used in JavaScript?
Javascript
What is the Command pattern and how is it used?
Javascript
What is the Decorator pattern and how is it used?
Javascript
What is the difference between a parameter and an argument?
Javascript
What is the difference between `event.preventDefault()` and `event.stopPropagation()`?
Javascript
Html
What is the difference between `innerHTML` and `textContent`?
Javascript
Html
What is the difference between `mouseenter` and `mouseover` event in JavaScript and browsers?
Javascript
Html
What is the difference between `setTimeout()`, `setImmediate()`, and `process.nextTick()`?
Javascript
What is the difference between the Window object and the Document object?
Javascript
What is the DOM and how is it structured?
Javascript
Html
What is the Factory pattern and how is it used?
Javascript
What is the `Intl` namespace object for?
Javascript
I18n
What is the Module pattern and how does it help with encapsulation?
Javascript
What is the prototype chain and how does it work?
Javascript
What is the purpose of the `break` and `continue` statements?
Javascript
What is the purpose of the `finally` block?
Javascript
What is the purpose of the `new` keyword?
Javascript
What is the purpose of the `switch` statement?
Javascript
What is the spread operator and how is it used?
Javascript
What is the ternary operator and how is it used?
Javascript
What is the use of `Promise.all()`
Javascript
What language constructs do you use for iterating over object properties and array items in JavaScript?
Javascript
What tools and techniques do you use for debugging JavaScript code?
Javascript
When would you use `document.write()`?
Javascript
Html
Describe event bubbling in JavaScript and browsers
Javascript
Html
Describe event capturing in JavaScript and browsers
Javascript
Html
Describe the difference between a cookie, `sessionStorage` and `localStorage` in browsers
Javascript
Describe the difference between `<script>`, `<script async>` and `<script defer>`
Html
Javascript
Difference between: `function Person(){}`, `const person = Person()`, and `const person = new Person()` in JavaScript?
Javascript
Explain event delegation in JavaScript
Javascript
Html
Explain `Function.prototype.bind` in JavaScript
Javascript
Explain the concept of "hoisting" in JavaScript
Javascript
Explain how prototypal inheritance works in JavaScript
Javascript
Explain how `this` works in JavaScript
Javascript
Explain the difference between synchronous and asynchronous functions in JavaScript
Javascript
Explain the differences on the usage of `foo` between `function foo() {}` and `var foo = function() {}` in JavaScript
Javascript
What advantage is there for using the JavaScript arrow syntax for a method in a constructor?
Javascript
What are the differences between JavaScript ES2015 classes and ES5 function constructors?
Javascript
What are the differences between JavaScript variables created using `let`, `var` or `const`?
Javascript
What are the pros and cons of using Promises instead of callbacks in JavaScript?
Javascript
What are the various ways to create objects in JavaScript?
Javascript
What is a closure in JavaScript, and how/why would you use one?
Javascript
What is the event loop in JavaScript runtimes?
Javascript
What is the definition of a higher-order function in JavaScript?
Javascript
What is the difference between `==` and `===` in JavaScript?
Javascript
What's a typical use case for anonymous functions in JavaScript?
Javascript
What's the difference between a JavaScript variable that is: `null`, `undefined` or undeclared?
Javascript
What's the difference between `.call` and `.apply` in JavaScript?
Javascript