SlideShare a Scribd company logo
FullStack.Cafe - Never Fail Tech Interview
(https://www.fullstack.cafe)
50 Common Web Developer Interview Questions [2020 Updated]
Originally published on 50 Common Web Developer Interview Questions [2020 Updated] | FullStack.Cafe
(https://www.fullstack.cafeblogweb-developer-interview-questions)
Q1 : What is Coercion in JavaScript?
Q2 : Explain equality in JavaScript
Q3 : What is Scope in JavaScript?
Q4 : What is Design Patterns and why anyone should use them?
Q5 : What is the purpose of the alt attribute on images?
Q6 : What is meant by Continuous Integration?
Q7 : What is npm?
Q8 : What is webpack?
Q9 : What is blockchain?
Q10 : Explain Null and Undefined in JavaScript
Q11 : What is DOM (Document Object Model) and how is it linked to CSS?
Q12 : What is Sprint Planning?
Q13 : Implement enqueue and dequeue using only two stacks
Q14 : What is the difference between span and div?
Q15 : What are different HTTP Methods supported in Restful Web Services?
Q16 : What does Containerization mean?
Q17 : What is CORS and how to enable one?
Q18 : What is Cross Site Scripting (XSS)?
Q19 : How can I prevent XSS?
Q20 : What is test driven development?
Q21 : What does "use strict" do?
Q22 : What is the difference between procedural and object-oriented programming?
Q23 : What is Reactive Programming?
Q24 : How to compare two objects in JavaScript?
Q25 : What is IIFEs (Immediately Invoked Function Expressions)?
Q26 : Could you explain the difference between ES5 and ES6
Q27 : What is CSS selectors? Name some.
Q28 : How is responsive design different from adaptive design?
Q29 : Given two strings, return true if they are anagrams of one another
For example: Mary is an anagram of Army
Q30 : Explain almost standard, full standard and quirks mode
Q31 : What is HTML5 Web Storage? Explain localStorage and sessionStorage.
Q32 : How would you choose between SOAP and REST web services?
Q33 : What are the best practices for caching?
Q34 : What is Adapter Pattern?
Q35 : State the features of an interface.
Q36 : What are the DRY and DIE principles?
Q37 : What are the advantages and disadvantages of using "use strict"?
Q38 : Explain the difference between Object.freeze() vs const
Q39 : What are the features of Microservices?
Q40 : What is Hoisting in JavaScript?
Q41 : How does the “this” keyword work? Provide some code examples.
Q42 : Write a recursive function that performs a binary search
Q43 : What is “closure” in javascript? Provide an example?
Q44 : What is progressive rendering?
Q45 : What should be the purpose of OPTIONS method of RESTful web services?
Q46 : What is the difference between cohesion and coupling?
Q47 : What is GOD class and why should we avoid it?
Q48 : Explain difference between: function Person(){}, var person = Person(), and var person = new
Person()?
Q49 : Describe tree shaking mechanism in webpack
Q50 : What does it mean to “program to an interface”?
## Answers
Q1: What is Coercion in JavaScript?
Topic: JavaScript
In JavaScript conversion between different two build-in types called coercion. Coercion comes in two forms
in JavaScript: explicit and implicit.
Here's an example of explicit coercion:
var a = "42";
var b = Number( a );
a; // "42"
b; // 42 -- the number!
And here's an example of implicit coercion:
var a = "42";
var b = a * 1; // "42" implicitly coerced to 42 here
a; // "42"
b; // 42 -- the number!
Q2: Explain equality in JavaScript ★
Topic: JavaScript
JavaScript has both strict and type–converting comparisons:
Strict comparison (e.g., ===) checks for value equality without allowing coercion
Abstract comparison (e.g. ==) checks for value equality with coercion allowed
var a = "42";
var b = 42;
a == b; // true
a === b; // false
Some simple equalityrules:
If either value (aka side) in a comparison could be the true or false value, avoid == and use ===.
If either value in a comparison could be of these specific values (0, "", or [] -- empty array), avoid ==
and use ===.
In all other cases, you're safe to use ==. Not only is it safe, but in many cases it simplifies your code
in a way that improves readability.
Q3: What is Scope in JavaScript? ★
Topic: JavaScript
In JavaScript, each function gets its own scope. Scope is basically a collection of variables as well as the
rules for how those variables are accessed by name. Only code inside that function can access that
function's scoped variables.
A variable name has to be unique within the same scope. A scope can be nested inside another scope. If
one scope is nested inside another, code inside the innermost scope can access variables from either scope.
Q4: What is Design Patterns and why anyone should use them? ★
Topic: Design Patterns
Design patterns are a well-described solution to the most commonly encountered problems which occur
during software development.
Design pattern represents the best practices evolved over a period of time by experienced software
developers. They promote reusability which leads to a more robust and maintainable code.
Q5: What is the purpose of the alt attribute on images? ★
Topic: HTML5
The alt attribute provides alternative information for an image if a user cannot view it. The alt attribute should
be used to describe any images except those which only serve a decorative purposes, in which case it
should be left empty.
Q6: What is meant by Continuous Integration? ★
Topic: DevOps
Continuous Integration (CI) is a development practice that requires developers to integrate code into a
shared repository several times a day. Each check-in is then verified by an automated build, allowing teams
to detect problems early.
Q7: What is npm? ★
Topic: Node.js
npm stands for Node Package Manager. npm provides following two main functionalities:
Online repositories for node.js packages/modules which are searchable on search.nodejs.org
(http://search.nodejs.org)
Command line utility to install packages, do version management and dependency management of
Node.js packages.
Q8: What is webpack? ★
Topic: Webpack
Webpack is a build tool that puts all of your assets, including Javascript, images, fonts, and CSS, in a
dependency graph. Webpack lets you use require() in your source code to point to local files, like images,
and decide how they're processed in your final Javascript bundle, like replacing the path with a URL pointing
to a CDN.
Q9: What is blockchain? ★
Topic: Blockchain
Blockchain is a secure distributed ledger (data structure or database) that maintains a continuously growing
list of ordered records, called “blocks”, that are linked using cryptography. Each block contains a
cryptographic hash of the previous block, a timestamp, and transaction data.
By design, a blockchain is resistant to modification of the data. It is "an open, distributed ledger that can
record transactions between two parties efficiently and in a verifiable and permanent way".
Once recorded, the data in any given block cannot be altered retroactively without alteration of all
subsequent blocks, which requires consensus of the network majority.
Q10: Explain Null and Undefined in JavaScript ★★
Topic: JavaScript
JavaScript (and by extension TypeScript) has two bottom types: null and undefined. They are intended to
mean different things:
Something hasn't been initialized : undefined.
Something is currently unavailable: null.
Q11: What is DOM (Document Object Model) and how is it linked to CSS? ★★
Topic: CSS
The Document Object Model (DOM) is a cross-platform and language-independent application programming
interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object
representing a part of the document.
With the Document Object Model, programmers can create and build documents, navigate their structure,
and add, modify, or delete elements and content. The DOM specifies interfaces which may be used to
manage XML or HTML documents.
When a browser displays a document, it must combine the document's content with its style information. The
browser converts HTML and CSS into the DOM (Document Object Model). The DOM represents the
document in the computer's memory. It combines the document's content with its style.
Q12: What is Sprint Planning? ★★
Topic: Agile & Scrum
The work to be performed in the Sprint is planned at the Sprint Planning. This plan is created by the
collaborative work of the entire Scrum Team.
Sprint Planning answers the following:
What can be delivered in the Increment resulting from the upcoming Sprint?
How will the work needed to deliver the Increment be achieved?
The Sprint Goal is an objective set for the Sprint that can be met through the implementation of Product
Backlog.
Q13: Implement enqueue and dequeue using only two stacks ★★
Topic: JavaScript
Enqueue means to add an element, dequeue to remove an element.
var inputStack = []; // First stack
var outputStack = []; // Second stack
// For enqueue, just push the item into the first stack
function enqueue(stackInput, item) {
return stackInput.push(item);
}
function dequeue(stackInput, stackOutput) {
// Reverse the stack such that the first element of the output stack is the
// last element of the input stack. After that, pop the top of the output to
// get the first element that was ever pushed into the input stack
if (stackOutput.length <= 0) {
while(stackInput.length > 0) {
var elementToOutput = stackInput.pop();
stackOutput.push(elementToOutput);
}
}
return stackOutput.pop();
}
Q14: What is the difference between span and div? ★★
Topic: HTML5
div is a block element
span is inline element
For bonus points, you could point out that it’s illegal to place a block element inside an inline element, and
that while div can have a p tag, and a p tag can have a span, it is not possible for span to have a div or p tag
inside.
Q15: What are different HTTP Methods supported in Restful Web Services? ★★
Topic: SOA & REST API
Restful web services supported HTTP methods are:
GET,
POST,
PUT,
DELETE and
HEAD.
Q16: What does Containerization mean? ★★
Topic: DevOps
Containerisation is a type of virtualization strategy that emerged as an alternative to traditional hypervisor-
based virtualization.
In containerization, the operating system is shared by the different containers rather than cloned for each
virtual machine. For example Docker provides a container virtualization platform that serves as a good
alternative to hypervisor-based arrangements.
Q17: What is CORS and how to enable one? ★★
Topic: Web Security
A request for a resource (like an image or a font) outside of the origin is known as a cross-origin request.
CORS (cross-origin resource sharing) manages cross-origin requests. CORS allows servers to specify who
(i.e., which origins) can access the assets on the server, among many other things.
Access-Control-Allow-Origin is an HTTP header that defines which foreign origins are allowed to access the
content of pages on your domain via scripts using methods such as XMLHttpRequest.
For example, if your server provides both a website and an API intended for XMLHttpRequest access on a
remote websites, only the API resources should return the Access-Control-Allow-Origin header. Failure to do
so will allow foreign origins to read the contents of any page on your origin.
# Allow any site to read the contents of this JavaScript library, so that subresource integrity works
Access-Control-Allow-Origin: *
Q18: What is Cross Site Scripting (XSS)? ★★
Topic: Web Security
By using Cross Site Scripting (XSS) technique, users executed malicious scripts (also called payloads)
unintentionally by clicking on untrusted links and hence, these scripts pass cookies information to attackers.
Q19: How can I prevent XSS? ★★
Topic: Web Security
XSS can be prevented by sanitizing user input to the application. Always allowed those elements as input
which is absolutely essential for that field.
Q20: What is test driven development? ★★
Topic: Agile & Scrum
Test driven development (TDD) is also known as test-driven design. In this method, developer first writes an
automated test case which describes new function or improvement and then creates small codes to pass
that test, and later re-factors the new code to meet the acceptable standards.
Q21: What does "use strict" do? ★★
Topic: JavaScript
The use strict literal is entered at the top of a JavaScript program or at the top of a function and it helps you
write safer JavaScript code by throwing an error if a global variable is created by mistake. For example, the
following program will throw an error:
function doSomething(val) {
"use strict";
x = val + 10;
}`
It will throw an error because x was not defined and it is being set to some value in the global scope, which
isn't allowed with use strict The small change below fixes the error being thrown:
function doSomething(val) {
"use strict";
var x = val + 10;
}
Q22: What is the difference between procedural and object-oriented programming? ★★
Topic: OOP
Procedural programming is based upon the modular approach in which the larger programs are broken into
procedures. Each procedure is a set of instructions that are executed one after another. On the other hand,
OOP is based upon objects. An object consists of various elements, such as methods and variables.
Access modifiers are not used in procedural programming, which implies that the entire data can be
accessed freely anywhere in the program. In OOP, you can specify the scope of a particular data by using
access modifiers - public, private, internal, protected, and protected internal.
Q23: What is Reactive Programming? ★★
Topic: Reactive Programming
Reactive programming is programming with asynchronous data streams. Event buses or your typical click
events are really an asynchronous event stream, on which you can observe and do some side effects.
Reactive is that idea on steroids. You are able to create data streams of anything, not just from click and
hover events. Streams are cheap and ubiquitous, anything can be a stream: variables, user inputs,
properties, caches, data structures, etc. For example, imagine your Twitter feed would be a data stream in
the same fashion that click events are. You can listen to that stream and react accordingly.
Q24: How to compare two objects in JavaScript? ★★★
Topic: JavaScript
Two non-primitive values, like objects (including function and array) held by reference, so both == and ===
comparisons will simply check whether the references match, not anything about the underlying values.
For example, arrays are by default coerced to strings by simply joining all the values with commas (,) in
between. So two arrays with the same contents would not be == equal:
var a = [1,2,3];
var b = [1,2,3];
var c = "1,2,3";
a == c; // true
b == c; // true
a == b; // false
For deep object comparison use external libs like deep-equal or implement your own recursive equality
algorithm.
Q25: What is IIFEs (Immediately Invoked Function Expressions)? ★★★
Topic: JavaScript
It’s an Immediately-Invoked Function Expression, or IIFE for short. It executes immediately after it’s created:
(function IIFE(){
console.log( "Hello!" );
})();
// "Hello!"
This pattern is often used when trying to avoid polluting the global namespace, because all the variables
used inside the IIFE (like in any other normal function) are not visible outside its scope.
Q26: Could you explain the difference between ES5 and ES6 ★★★
Topic: JavaScript
ECMAScript 5 (ES5): The 5th edition of ECMAScript, standardized in 2009. This standard has been
implemented fairly completely in all modern browsers
ECMAScript 6 (ES6)/ ECMAScript 2015 (ES2015): The 6th edition of ECMAScript, standardized in
2015. This standard has been partially implemented in most modern browsers.
Here are some key differences between ES5 and ES6:
Arrow functions & string interpolation:
Consider:
const greetings = (name) => {
return `hello ${name}`;
}
and even:
const greetings = name => `hello ${name}`;
Const.
Const works like a constant in other languages in many ways but there are some caveats. Const
stands for ‘constant reference’ to a value. So with const, you can actually mutate the properties of
an object being referenced by the variable. You just can’t change the reference itself.
const NAMES = [];
NAMES.push("Jim");
console.log(NAMES.length === 1); // true
NAMES = ["Steve", "John"]; // error
Block-scoped variables.
The new ES6 keyword let allows developers to scope variables at the block level.
Let doesn’t hoist in the same way var does.
Default parameter values
Default parameters allow us to initialize functions with default values. A default is used when an
argument is either omitted or undefined — meaning null is a valid value.
// Basic syntax
function multiply (a, b = 2) {
return a * b;
}
multiply(5); // 10
** Class Definition and Inheritance**
ES6 introduces language support for classes (class keyword), constructors (constructor keyword),
and the extend keyword for inheritance.
for-of operator
The for...of statement creates a loop iterating over iterable objects.
Spread Operator
For objects merging
const obj1 = { a: 1, b: 2 }
const obj2 = { a: 2, c: 3, d: 4}
const obj3 = {...obj1, ...obj2}
Promises
Promises provide a mechanism to handle the results and errors from asynchronous operations. You
can accomplish the same thing with callbacks, but promises provide improved readability via
method chaining and succinct error handling.
const isGreater = (a, b) => {
return new Promise ((resolve, reject) => {
if(a > b) {
resolve(true)
} else {
reject(false)
}
})
}
isGreater(1, 2)
.then(result => {
console.log('greater')
})
.catch(result => {
console.log('smaller')
})
Modules exporting & importing
Consider module exporting:
const myModule = { x: 1, y: () => { console.log('This is ES5') }}
export default myModule;
and importing:
import myModule from './myModule';
Q27: What is CSS selectors? Name some. ★★★
Topic: CSS
A CSS selector is the part of a CSS rule set that actually selects the content you want to style.
Consider some types of CSS selectors:
Universal selector: *
Element type selector: ul, td
ID Selector: #id
Class selector: .box
Descendant combinator: #id .box. The .box element doesn’t have to be an immediate child of #id.
Child combinator: #id > .box. Unlike the descendant combinator, there can’t be another element
wrapping .box
General Sibling Combinator: ~
Adjacent Sibling Combinator: +. The difference from general sibling combinaltor is that the targeted
element must be an immediate sibling, not just a general sibling.
Attribute Selector: input[type="text"]
Pseudo-class: a:hover. A pseudo-class uses a colon character to identify a pseudo-state that an
element might be in.
Pseudo-element: .container::before. This selector inserts an imaginary element into the page, inside
the targeted element, before its contents.
Q28: How is responsive design different from adaptive design? ★★★
Topic: CSS
Both responsive and adaptive design attempt to optimize the user experience across different devices,
adjusting for different viewport sizes, resolutions, usage contexts, control mechanisms, and so on.
Responsive design works on the principle of flexibility — a single fluid website that can look good on any
device. Responsive websites use media queries, flexible grids, and responsive images to create a user
experience that flexes and changes based on a multitude of factors. Like a single ball growing or shrinking to
fit through several different hoops.
Adaptive design is more like the modern definition of progressive enhancement. Instead of one flexible
design, adaptive design detects the device and other features, and then provides the appropriate feature and
layout based on a predefined set of viewport sizes and other characteristics. The site detects the type of
device used, and delivers the pre-set layout for that device. Instead of a single ball going through several
different-sized hoops, you’d have several different balls to use depending on the hoop size.
Q29: Given two strings, return true if they are anagrams of one another ★★★
Topic: JavaScript
Details:
For example: Mary is an anagram of Army
Answer:
var firstWord = "Mary";
var secondWord = "Army";
isAnagram(firstWord, secondWord); // true
function isAnagram(first, second) {
// For case insensitivity, change both words to lowercase.
var a = first.toLowerCase();
var b = second.toLowerCase();
// Sort the strings, and join the resulting array to a string. Compare the results
a = a.split("").sort().join("");
b = b.split("").sort().join("");
return a === b;
}
Q30: Explain almost standard, full standard and quirks mode ★★★
Topic: HTML5
There are now three modes used by the layout engines in web browsers: quirks mode, almost standards
mode, and full standards mode.
In quirks mode, layout emulates nonstandard behavior in Navigator 4 and Internet Explorer 5. This
is essential in order to support websites that were built before the widespread adoption of web
standards.
In full standards mode, the behavior is (hopefully) the behavior described by the HTML and CSS
specifications.
In almost standards mode, there are only a very small number of quirks implemented.
For HTML documents, browsers use a DOCTYPE in the beginning of the document to decide whether to
handle it in quirks mode or standards mode.
Q31: What is HTML5 Web Storage? Explain localStorage and sessionStorage. ★★★
Topic: HTML5
With HTML5, web pages can store data locally within the user’s browser.
The data is stored in name/value pairs, and a web page can only access data stored by itself.
Differences between localStorage and sessionStorage regarding lifetime:
Data stored through localStorage is permanent: it does not expire and remains stored on the user’s
computer until a web app deletes it or the user asks the browser to delete it.
sessionStorage has the same lifetime as the top-level window or browser tab in which the data got
stored. When the tab is permanently closed, any data stored through sessionStorage is deleted.
Differences between localStorage and sessionStorage regarding storage scope:
Both forms of storage are scoped to the document origin so that documents with different origins will never
share the stored objects.
sessionStorage is also scoped on a per-window basis. Two browser tabs with documents from the
same origin have separate sessionStorage data.
Unlike in localStorage, the same scripts from the same origin can't access each other's
sessionStorage when opened in different tabs.
Q32: How would you choose between SOAP and REST web services? ★★★
Topic: SOA & REST API
Web Services work on client-server model and when it comes to choose between SOAP and REST, it all
depends on project requirements. Let’s look at some of the conditions affecting our choice:
Do you know your web service clients beforehand? If Yes, then you can define a contract before
implementation and SOAP seems better choice. But if you don’t then REST seems better choice
because you can provide sample request/response and test cases easily for client applications to
use later on.
How much time you have? For quick implementation REST is the best choice. You can create web
service easily, test it through browser/curl and get ready for your clients.
What kind of data format are supported? If only XML then you can go with SOAP but if you think
about supporting JSON also in future then go with REST.
Q33: What are the best practices for caching? ★★★
Topic: SOA & REST API
Always keep static contents like images, css, JavaScript cacheable, with expiration date of 2 to 3 days.
Never keep expiry date too high.
Dynamic contents should be cached for few hours only.
Q34: What is Adapter Pattern? ★★★
Topic: Design Patterns
Adapter pattern works as a bridge between two incompatible interfaces. This pattern involves a single class
which is responsible to join functionalities of independent or incompatible interfaces (adaptees).
A real life example could be a case of card reader which acts as an adapter between memory card and a
laptop. You plugin the memory card into card reader and card reader into the laptop so that memory card
can be read via laptop.
Q35: State the features of an interface. ★★★
Topic: OOP
An interface is a template that contains only the signature of methods. The signature of a method consists of
the numbers of parameters, the type of parameter (value, reference, or output), and the order of parameters.
An interface has no implementation on its own because it contains only the definition of methods without any
method body. An interface is defined using the interface keyword. Moreover, you cannot instantiate an
interface. The various features of an interface are as follows:
An interface is used to implement multiple inheritance in code. This feature of an interface is quite
different from that of abstract classes because a class cannot derive the features of more than one
class but can easily implement multiple interfaces.
It defines a specific set of methods and their arguments.
Variables in interface must be declared as public, static, and final while methods must be public and
abstract.
A class implementing an interface must implement all of its methods.
An interface can derive from more than one interface.
Q36: What are the DRY and DIE principles? ★★★
Topic: Software Architecture
In software engineering, Don't Repeat Yourself (DRY) or Duplication is Evil (DIE) is a principle of software
development.
Q37: What are the advantages and disadvantages of using "use strict"? ★★★
Topic: JavaScript
'use strict' is a statement used to enable strict mode to entire scripts or individual functions. Strict mode is a
way to opt into a restricted variant of JavaScript.
Advantages:
Makes it impossible to accidentally create global variables.
Makes assignments which would otherwise silently fail to throw an exception.
Makes attempts to delete undeletable properties throw (where before the attempt would simply
have no effect).
Requires that function parameter names be unique.
this is undefined in the global context.
It catches some common coding bloopers, throwing exceptions.
It disables features that are confusing or poorly thought out.
Disadvantages:
Many missing features that some developers might be used to.
No more access to function.caller and function.arguments.
Concatenation of scripts written in different strict modes might cause issues.
Overall, I think the benefits outweigh the disadvantages, and I never had to rely on the features that strict
mode blocks. I would recommend using strict mode.
Q38: Explain the difference between Object.freeze() vs const ★★★
Topic: JavaScript
const and Object.freeze are two completely different things.
const applies to bindings ("variables"). It creates an immutable binding, i.e. you cannot assign a
new value to the binding.
const person = {
name: "Leonardo"
};
let animal = {
species: "snake"
};
person = animal; // ERROR "person" is read-only
Object.freeze works on values, and more specifically, object values. It makes an object immutable,
i.e. you cannot change its properties.
let person = {
name: "Leonardo"
};
let animal = {
species: "snake"
};
Object.freeze(person);
person.name = "Lima"; //TypeError: Cannot assign to read only property 'name' of object
console.log(person);
Q39: What are the features of Microservices? ★★★
Topic: Microservices
Decoupling – Services within a system are largely decoupled. So the application as a whole can be
easily built, altered, and scaled
Componentization – Microservices are treated as independent components that can be easily
replaced and upgraded
Business Capabilities – Microservices are very simple and focus on a single capability
Autonomy – Developers and teams can work independently of each other, thus increasing speed
Continous Delivery – Allows frequent releases of software, through systematic automation of
software creation, testing, and approval
Responsibility – Microservices do not focus on applications as projects. Instead, they treat
applications as products for which they are responsible
Decentralized Governance – The focus is on using the right tool for the right job. That means there
is no standardized pattern or any technology pattern. Developers have the freedom to choose the
best useful tools to solve their problems
Agility – Microservices support agile development. Any new feature can be quickly developed and
discarded again
Q40: What is Hoisting in JavaScript? ★★★★
Topic: JavaScript
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q41: How does the “this” keyword work? Provide some code examples. ★★★★
Topic: JavaScript
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q42: Write a recursive function that performs a binary search ★★★★
Topic: JavaScript
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q43: What is “closure” in javascript? Provide an example? ★★★★
Topic: JavaScript
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q44: What is progressive rendering? ★★★★
Topic: HTML5
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q45: What should be the purpose of OPTIONS method of RESTful web services?
★★★★
Topic: SOA & REST API
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q46: What is the difference between cohesion and coupling? ★★★★
Topic: OOP
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q47: What is GOD class and why should we avoid it? ★★★★
Topic: Software Architecture
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q48: Explain difference between: function Person(){}, var person = Person(), and var
person = new Person()? ★★★★
Topic: JavaScript
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q49: Describe tree shaking mechanism in webpack ★★★★★
Topic: Webpack
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)
Q50: What does it mean to “program to an interface”? ★★★★★
Topic: OOP
Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)

More Related Content

What's hot

DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)
Soham Kansodaria
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
Scott Hurrey
 
Ppt mbitr
Ppt mbitrPpt mbitr
Ppt mbitr
Jerome Smith
 
Cross site scripting XSS
Cross site scripting XSSCross site scripting XSS
Cross site scripting XSS
Ronan Dunne, CEH, SSCP
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
Jonathan Goode
 
Bug Bounty 101
Bug Bounty 101Bug Bounty 101
Bug Bounty 101
Shahee Mirza
 
File inclusion
File inclusionFile inclusion
File inclusion
AaftabKhan14
 
Programming Game AI by Example. Ch7. Raven
Programming Game AI by Example. Ch7. RavenProgramming Game AI by Example. Ch7. Raven
Programming Game AI by Example. Ch7. Raven
Ryan Park
 
Multi Tenancy With Python and Django
Multi Tenancy With Python and DjangoMulti Tenancy With Python and Django
Multi Tenancy With Python and Django
scottcrespo
 
NetSuite Tip: Creating Custom Fields In NetSuite
NetSuite Tip: Creating Custom Fields In NetSuiteNetSuite Tip: Creating Custom Fields In NetSuite
NetSuite Tip: Creating Custom Fields In NetSuite
Protelo, Inc.
 
5 Nuclear decay test solutions
5 Nuclear decay test solutions5 Nuclear decay test solutions
5 Nuclear decay test solutions
Paul Burgess
 
Host Header injection - Slides
Host Header injection - SlidesHost Header injection - Slides
Host Header injection - Slides
Amit Dubey
 
Janus conf19: TUTORIAL: KITE with network-instrumentation
Janus conf19: TUTORIAL: KITE with network-instrumentationJanus conf19: TUTORIAL: KITE with network-instrumentation
Janus conf19: TUTORIAL: KITE with network-instrumentation
Alexandre Gouaillard
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,
AAlha PaiKra
 

What's hot (14)

DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
Ppt mbitr
Ppt mbitrPpt mbitr
Ppt mbitr
 
Cross site scripting XSS
Cross site scripting XSSCross site scripting XSS
Cross site scripting XSS
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Bug Bounty 101
Bug Bounty 101Bug Bounty 101
Bug Bounty 101
 
File inclusion
File inclusionFile inclusion
File inclusion
 
Programming Game AI by Example. Ch7. Raven
Programming Game AI by Example. Ch7. RavenProgramming Game AI by Example. Ch7. Raven
Programming Game AI by Example. Ch7. Raven
 
Multi Tenancy With Python and Django
Multi Tenancy With Python and DjangoMulti Tenancy With Python and Django
Multi Tenancy With Python and Django
 
NetSuite Tip: Creating Custom Fields In NetSuite
NetSuite Tip: Creating Custom Fields In NetSuiteNetSuite Tip: Creating Custom Fields In NetSuite
NetSuite Tip: Creating Custom Fields In NetSuite
 
5 Nuclear decay test solutions
5 Nuclear decay test solutions5 Nuclear decay test solutions
5 Nuclear decay test solutions
 
Host Header injection - Slides
Host Header injection - SlidesHost Header injection - Slides
Host Header injection - Slides
 
Janus conf19: TUTORIAL: KITE with network-instrumentation
Janus conf19: TUTORIAL: KITE with network-instrumentationJanus conf19: TUTORIAL: KITE with network-instrumentation
Janus conf19: TUTORIAL: KITE with network-instrumentation
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,
 

Similar to 50 common web developer interview questions [2020 updated] [www.full stack.cafe]

JavaScript Interview Questions with Answers
JavaScript Interview Questions with AnswersJavaScript Interview Questions with Answers
JavaScript Interview Questions with Answers
AK Deep Knowledge
 
Backend Development Bootcamp - Node [Online & Offline] In Bangla
Backend Development Bootcamp - Node [Online & Offline] In BanglaBackend Development Bootcamp - Node [Online & Offline] In Bangla
Backend Development Bootcamp - Node [Online & Offline] In Bangla
Stack Learner
 
WEB MODULE 3.pdf
WEB MODULE 3.pdfWEB MODULE 3.pdf
WEB MODULE 3.pdf
Deepika A B
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
Juho Vepsäläinen
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
cNguyn506241
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
Alex Ershov
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview Questions
Luis Martín Espino Rivera
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)
smumbahelp
 
Nt1310 Unit 3 Language Analysis
Nt1310 Unit 3 Language AnalysisNt1310 Unit 3 Language Analysis
Nt1310 Unit 3 Language Analysis
Nicole Gomez
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
LINAGORA
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
Sri K
 
Node js
Node jsNode js
Node js
Chirag Parmar
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
Ramu Palanki
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
Ramu Palanki
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Tracy Clark
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
kavinilavuG
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
Krishnaov
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
NicheTech Com. Solutions Pvt. Ltd.
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 

Similar to 50 common web developer interview questions [2020 updated] [www.full stack.cafe] (20)

JavaScript Interview Questions with Answers
JavaScript Interview Questions with AnswersJavaScript Interview Questions with Answers
JavaScript Interview Questions with Answers
 
Backend Development Bootcamp - Node [Online & Offline] In Bangla
Backend Development Bootcamp - Node [Online & Offline] In BanglaBackend Development Bootcamp - Node [Online & Offline] In Bangla
Backend Development Bootcamp - Node [Online & Offline] In Bangla
 
WEB MODULE 3.pdf
WEB MODULE 3.pdfWEB MODULE 3.pdf
WEB MODULE 3.pdf
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview Questions
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)
 
Nt1310 Unit 3 Language Analysis
Nt1310 Unit 3 Language AnalysisNt1310 Unit 3 Language Analysis
Nt1310 Unit 3 Language Analysis
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
 
Node js
Node jsNode js
Node js
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
 

Recently uploaded

Introducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptxIntroducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptx
FauzanHarits1
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
MuhammadWaqasBaloch1
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
KateRobinson68
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
Alliance Jobs
 
A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024
Bruce Bennett
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
Ghh
 
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
dsnow9802
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
GabrielleSinaga
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
cahgading001
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
Thomas GIRARD BDes
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
kakomaeric00
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
2zjra9bn
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Sreenivas702647
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
SocMediaFin - Joyce Sullivan
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
2zjra9bn
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
SnapJob
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
Ghh
 
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
NWEXAM
 
Learnings from Successful Jobs Searchers
Learnings from Successful Jobs SearchersLearnings from Successful Jobs Searchers
Learnings from Successful Jobs Searchers
Bruce Bennett
 
IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
Base Camp
 

Recently uploaded (20)

Introducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptxIntroducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptx
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
 
A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024A Guide to a Winning Interview June 2024
A Guide to a Winning Interview June 2024
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
 
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
Jill Pizzola's Tenure as Senior Talent Acquisition Partner at THOMSON REUTERS...
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
 
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
 
Learnings from Successful Jobs Searchers
Learnings from Successful Jobs SearchersLearnings from Successful Jobs Searchers
Learnings from Successful Jobs Searchers
 
IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
 

50 common web developer interview questions [2020 updated] [www.full stack.cafe]

  • 1. FullStack.Cafe - Never Fail Tech Interview (https://www.fullstack.cafe) 50 Common Web Developer Interview Questions [2020 Updated] Originally published on 50 Common Web Developer Interview Questions [2020 Updated] | FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q1 : What is Coercion in JavaScript? Q2 : Explain equality in JavaScript Q3 : What is Scope in JavaScript? Q4 : What is Design Patterns and why anyone should use them? Q5 : What is the purpose of the alt attribute on images? Q6 : What is meant by Continuous Integration? Q7 : What is npm? Q8 : What is webpack? Q9 : What is blockchain? Q10 : Explain Null and Undefined in JavaScript Q11 : What is DOM (Document Object Model) and how is it linked to CSS? Q12 : What is Sprint Planning? Q13 : Implement enqueue and dequeue using only two stacks Q14 : What is the difference between span and div? Q15 : What are different HTTP Methods supported in Restful Web Services? Q16 : What does Containerization mean? Q17 : What is CORS and how to enable one? Q18 : What is Cross Site Scripting (XSS)? Q19 : How can I prevent XSS? Q20 : What is test driven development? Q21 : What does "use strict" do? Q22 : What is the difference between procedural and object-oriented programming? Q23 : What is Reactive Programming? Q24 : How to compare two objects in JavaScript?
  • 2. Q25 : What is IIFEs (Immediately Invoked Function Expressions)? Q26 : Could you explain the difference between ES5 and ES6 Q27 : What is CSS selectors? Name some. Q28 : How is responsive design different from adaptive design? Q29 : Given two strings, return true if they are anagrams of one another For example: Mary is an anagram of Army Q30 : Explain almost standard, full standard and quirks mode Q31 : What is HTML5 Web Storage? Explain localStorage and sessionStorage. Q32 : How would you choose between SOAP and REST web services? Q33 : What are the best practices for caching? Q34 : What is Adapter Pattern? Q35 : State the features of an interface. Q36 : What are the DRY and DIE principles? Q37 : What are the advantages and disadvantages of using "use strict"? Q38 : Explain the difference between Object.freeze() vs const Q39 : What are the features of Microservices? Q40 : What is Hoisting in JavaScript? Q41 : How does the “this” keyword work? Provide some code examples. Q42 : Write a recursive function that performs a binary search Q43 : What is “closure” in javascript? Provide an example? Q44 : What is progressive rendering? Q45 : What should be the purpose of OPTIONS method of RESTful web services? Q46 : What is the difference between cohesion and coupling? Q47 : What is GOD class and why should we avoid it? Q48 : Explain difference between: function Person(){}, var person = Person(), and var person = new Person()? Q49 : Describe tree shaking mechanism in webpack Q50 : What does it mean to “program to an interface”?
  • 3. ## Answers Q1: What is Coercion in JavaScript? Topic: JavaScript In JavaScript conversion between different two build-in types called coercion. Coercion comes in two forms in JavaScript: explicit and implicit. Here's an example of explicit coercion: var a = "42"; var b = Number( a ); a; // "42" b; // 42 -- the number! And here's an example of implicit coercion: var a = "42"; var b = a * 1; // "42" implicitly coerced to 42 here a; // "42" b; // 42 -- the number! Q2: Explain equality in JavaScript ★ Topic: JavaScript JavaScript has both strict and type–converting comparisons: Strict comparison (e.g., ===) checks for value equality without allowing coercion Abstract comparison (e.g. ==) checks for value equality with coercion allowed var a = "42"; var b = 42; a == b; // true a === b; // false Some simple equalityrules: If either value (aka side) in a comparison could be the true or false value, avoid == and use ===. If either value in a comparison could be of these specific values (0, "", or [] -- empty array), avoid == and use ===. In all other cases, you're safe to use ==. Not only is it safe, but in many cases it simplifies your code in a way that improves readability. Q3: What is Scope in JavaScript? ★ Topic: JavaScript
  • 4. In JavaScript, each function gets its own scope. Scope is basically a collection of variables as well as the rules for how those variables are accessed by name. Only code inside that function can access that function's scoped variables. A variable name has to be unique within the same scope. A scope can be nested inside another scope. If one scope is nested inside another, code inside the innermost scope can access variables from either scope. Q4: What is Design Patterns and why anyone should use them? ★ Topic: Design Patterns Design patterns are a well-described solution to the most commonly encountered problems which occur during software development. Design pattern represents the best practices evolved over a period of time by experienced software developers. They promote reusability which leads to a more robust and maintainable code. Q5: What is the purpose of the alt attribute on images? ★ Topic: HTML5 The alt attribute provides alternative information for an image if a user cannot view it. The alt attribute should be used to describe any images except those which only serve a decorative purposes, in which case it should be left empty. Q6: What is meant by Continuous Integration? ★ Topic: DevOps Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. Q7: What is npm? ★ Topic: Node.js npm stands for Node Package Manager. npm provides following two main functionalities: Online repositories for node.js packages/modules which are searchable on search.nodejs.org (http://search.nodejs.org) Command line utility to install packages, do version management and dependency management of Node.js packages. Q8: What is webpack? ★ Topic: Webpack Webpack is a build tool that puts all of your assets, including Javascript, images, fonts, and CSS, in a dependency graph. Webpack lets you use require() in your source code to point to local files, like images, and decide how they're processed in your final Javascript bundle, like replacing the path with a URL pointing to a CDN. Q9: What is blockchain? ★
  • 5. Topic: Blockchain Blockchain is a secure distributed ledger (data structure or database) that maintains a continuously growing list of ordered records, called “blocks”, that are linked using cryptography. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. By design, a blockchain is resistant to modification of the data. It is "an open, distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way". Once recorded, the data in any given block cannot be altered retroactively without alteration of all subsequent blocks, which requires consensus of the network majority. Q10: Explain Null and Undefined in JavaScript ★★ Topic: JavaScript JavaScript (and by extension TypeScript) has two bottom types: null and undefined. They are intended to mean different things: Something hasn't been initialized : undefined. Something is currently unavailable: null. Q11: What is DOM (Document Object Model) and how is it linked to CSS? ★★ Topic: CSS The Document Object Model (DOM) is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object representing a part of the document. With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content. The DOM specifies interfaces which may be used to manage XML or HTML documents. When a browser displays a document, it must combine the document's content with its style information. The browser converts HTML and CSS into the DOM (Document Object Model). The DOM represents the document in the computer's memory. It combines the document's content with its style. Q12: What is Sprint Planning? ★★ Topic: Agile & Scrum The work to be performed in the Sprint is planned at the Sprint Planning. This plan is created by the collaborative work of the entire Scrum Team. Sprint Planning answers the following: What can be delivered in the Increment resulting from the upcoming Sprint? How will the work needed to deliver the Increment be achieved? The Sprint Goal is an objective set for the Sprint that can be met through the implementation of Product Backlog. Q13: Implement enqueue and dequeue using only two stacks ★★ Topic: JavaScript
  • 6. Enqueue means to add an element, dequeue to remove an element. var inputStack = []; // First stack var outputStack = []; // Second stack // For enqueue, just push the item into the first stack function enqueue(stackInput, item) { return stackInput.push(item); } function dequeue(stackInput, stackOutput) { // Reverse the stack such that the first element of the output stack is the // last element of the input stack. After that, pop the top of the output to // get the first element that was ever pushed into the input stack if (stackOutput.length <= 0) { while(stackInput.length > 0) { var elementToOutput = stackInput.pop(); stackOutput.push(elementToOutput); } } return stackOutput.pop(); } Q14: What is the difference between span and div? ★★ Topic: HTML5 div is a block element span is inline element For bonus points, you could point out that it’s illegal to place a block element inside an inline element, and that while div can have a p tag, and a p tag can have a span, it is not possible for span to have a div or p tag inside. Q15: What are different HTTP Methods supported in Restful Web Services? ★★ Topic: SOA & REST API Restful web services supported HTTP methods are: GET, POST, PUT, DELETE and HEAD. Q16: What does Containerization mean? ★★ Topic: DevOps Containerisation is a type of virtualization strategy that emerged as an alternative to traditional hypervisor- based virtualization.
  • 7. In containerization, the operating system is shared by the different containers rather than cloned for each virtual machine. For example Docker provides a container virtualization platform that serves as a good alternative to hypervisor-based arrangements. Q17: What is CORS and how to enable one? ★★ Topic: Web Security A request for a resource (like an image or a font) outside of the origin is known as a cross-origin request. CORS (cross-origin resource sharing) manages cross-origin requests. CORS allows servers to specify who (i.e., which origins) can access the assets on the server, among many other things. Access-Control-Allow-Origin is an HTTP header that defines which foreign origins are allowed to access the content of pages on your domain via scripts using methods such as XMLHttpRequest. For example, if your server provides both a website and an API intended for XMLHttpRequest access on a remote websites, only the API resources should return the Access-Control-Allow-Origin header. Failure to do so will allow foreign origins to read the contents of any page on your origin. # Allow any site to read the contents of this JavaScript library, so that subresource integrity works Access-Control-Allow-Origin: * Q18: What is Cross Site Scripting (XSS)? ★★ Topic: Web Security By using Cross Site Scripting (XSS) technique, users executed malicious scripts (also called payloads) unintentionally by clicking on untrusted links and hence, these scripts pass cookies information to attackers. Q19: How can I prevent XSS? ★★ Topic: Web Security XSS can be prevented by sanitizing user input to the application. Always allowed those elements as input which is absolutely essential for that field. Q20: What is test driven development? ★★ Topic: Agile & Scrum Test driven development (TDD) is also known as test-driven design. In this method, developer first writes an automated test case which describes new function or improvement and then creates small codes to pass that test, and later re-factors the new code to meet the acceptable standards. Q21: What does "use strict" do? ★★ Topic: JavaScript The use strict literal is entered at the top of a JavaScript program or at the top of a function and it helps you write safer JavaScript code by throwing an error if a global variable is created by mistake. For example, the following program will throw an error:
  • 8. function doSomething(val) { "use strict"; x = val + 10; }` It will throw an error because x was not defined and it is being set to some value in the global scope, which isn't allowed with use strict The small change below fixes the error being thrown: function doSomething(val) { "use strict"; var x = val + 10; } Q22: What is the difference between procedural and object-oriented programming? ★★ Topic: OOP Procedural programming is based upon the modular approach in which the larger programs are broken into procedures. Each procedure is a set of instructions that are executed one after another. On the other hand, OOP is based upon objects. An object consists of various elements, such as methods and variables. Access modifiers are not used in procedural programming, which implies that the entire data can be accessed freely anywhere in the program. In OOP, you can specify the scope of a particular data by using access modifiers - public, private, internal, protected, and protected internal. Q23: What is Reactive Programming? ★★ Topic: Reactive Programming Reactive programming is programming with asynchronous data streams. Event buses or your typical click events are really an asynchronous event stream, on which you can observe and do some side effects. Reactive is that idea on steroids. You are able to create data streams of anything, not just from click and hover events. Streams are cheap and ubiquitous, anything can be a stream: variables, user inputs, properties, caches, data structures, etc. For example, imagine your Twitter feed would be a data stream in the same fashion that click events are. You can listen to that stream and react accordingly. Q24: How to compare two objects in JavaScript? ★★★ Topic: JavaScript Two non-primitive values, like objects (including function and array) held by reference, so both == and === comparisons will simply check whether the references match, not anything about the underlying values. For example, arrays are by default coerced to strings by simply joining all the values with commas (,) in between. So two arrays with the same contents would not be == equal: var a = [1,2,3]; var b = [1,2,3]; var c = "1,2,3"; a == c; // true b == c; // true a == b; // false
  • 9. For deep object comparison use external libs like deep-equal or implement your own recursive equality algorithm. Q25: What is IIFEs (Immediately Invoked Function Expressions)? ★★★ Topic: JavaScript It’s an Immediately-Invoked Function Expression, or IIFE for short. It executes immediately after it’s created: (function IIFE(){ console.log( "Hello!" ); })(); // "Hello!" This pattern is often used when trying to avoid polluting the global namespace, because all the variables used inside the IIFE (like in any other normal function) are not visible outside its scope. Q26: Could you explain the difference between ES5 and ES6 ★★★ Topic: JavaScript ECMAScript 5 (ES5): The 5th edition of ECMAScript, standardized in 2009. This standard has been implemented fairly completely in all modern browsers ECMAScript 6 (ES6)/ ECMAScript 2015 (ES2015): The 6th edition of ECMAScript, standardized in 2015. This standard has been partially implemented in most modern browsers. Here are some key differences between ES5 and ES6: Arrow functions & string interpolation: Consider: const greetings = (name) => { return `hello ${name}`; } and even: const greetings = name => `hello ${name}`; Const. Const works like a constant in other languages in many ways but there are some caveats. Const stands for ‘constant reference’ to a value. So with const, you can actually mutate the properties of an object being referenced by the variable. You just can’t change the reference itself. const NAMES = []; NAMES.push("Jim"); console.log(NAMES.length === 1); // true NAMES = ["Steve", "John"]; // error Block-scoped variables. The new ES6 keyword let allows developers to scope variables at the block level.
  • 10. Let doesn’t hoist in the same way var does. Default parameter values Default parameters allow us to initialize functions with default values. A default is used when an argument is either omitted or undefined — meaning null is a valid value. // Basic syntax function multiply (a, b = 2) { return a * b; } multiply(5); // 10 ** Class Definition and Inheritance** ES6 introduces language support for classes (class keyword), constructors (constructor keyword), and the extend keyword for inheritance. for-of operator The for...of statement creates a loop iterating over iterable objects. Spread Operator For objects merging const obj1 = { a: 1, b: 2 } const obj2 = { a: 2, c: 3, d: 4} const obj3 = {...obj1, ...obj2} Promises Promises provide a mechanism to handle the results and errors from asynchronous operations. You can accomplish the same thing with callbacks, but promises provide improved readability via method chaining and succinct error handling. const isGreater = (a, b) => { return new Promise ((resolve, reject) => { if(a > b) { resolve(true) } else { reject(false) } }) } isGreater(1, 2) .then(result => { console.log('greater') }) .catch(result => { console.log('smaller') }) Modules exporting & importing Consider module exporting:
  • 11. const myModule = { x: 1, y: () => { console.log('This is ES5') }} export default myModule; and importing: import myModule from './myModule'; Q27: What is CSS selectors? Name some. ★★★ Topic: CSS A CSS selector is the part of a CSS rule set that actually selects the content you want to style. Consider some types of CSS selectors: Universal selector: * Element type selector: ul, td ID Selector: #id Class selector: .box Descendant combinator: #id .box. The .box element doesn’t have to be an immediate child of #id. Child combinator: #id > .box. Unlike the descendant combinator, there can’t be another element wrapping .box General Sibling Combinator: ~ Adjacent Sibling Combinator: +. The difference from general sibling combinaltor is that the targeted element must be an immediate sibling, not just a general sibling. Attribute Selector: input[type="text"] Pseudo-class: a:hover. A pseudo-class uses a colon character to identify a pseudo-state that an element might be in. Pseudo-element: .container::before. This selector inserts an imaginary element into the page, inside the targeted element, before its contents. Q28: How is responsive design different from adaptive design? ★★★ Topic: CSS Both responsive and adaptive design attempt to optimize the user experience across different devices, adjusting for different viewport sizes, resolutions, usage contexts, control mechanisms, and so on. Responsive design works on the principle of flexibility — a single fluid website that can look good on any device. Responsive websites use media queries, flexible grids, and responsive images to create a user experience that flexes and changes based on a multitude of factors. Like a single ball growing or shrinking to fit through several different hoops. Adaptive design is more like the modern definition of progressive enhancement. Instead of one flexible design, adaptive design detects the device and other features, and then provides the appropriate feature and layout based on a predefined set of viewport sizes and other characteristics. The site detects the type of device used, and delivers the pre-set layout for that device. Instead of a single ball going through several different-sized hoops, you’d have several different balls to use depending on the hoop size. Q29: Given two strings, return true if they are anagrams of one another ★★★ Topic: JavaScript
  • 12. Details: For example: Mary is an anagram of Army Answer: var firstWord = "Mary"; var secondWord = "Army"; isAnagram(firstWord, secondWord); // true function isAnagram(first, second) { // For case insensitivity, change both words to lowercase. var a = first.toLowerCase(); var b = second.toLowerCase(); // Sort the strings, and join the resulting array to a string. Compare the results a = a.split("").sort().join(""); b = b.split("").sort().join(""); return a === b; } Q30: Explain almost standard, full standard and quirks mode ★★★ Topic: HTML5 There are now three modes used by the layout engines in web browsers: quirks mode, almost standards mode, and full standards mode. In quirks mode, layout emulates nonstandard behavior in Navigator 4 and Internet Explorer 5. This is essential in order to support websites that were built before the widespread adoption of web standards. In full standards mode, the behavior is (hopefully) the behavior described by the HTML and CSS specifications. In almost standards mode, there are only a very small number of quirks implemented. For HTML documents, browsers use a DOCTYPE in the beginning of the document to decide whether to handle it in quirks mode or standards mode. Q31: What is HTML5 Web Storage? Explain localStorage and sessionStorage. ★★★ Topic: HTML5 With HTML5, web pages can store data locally within the user’s browser. The data is stored in name/value pairs, and a web page can only access data stored by itself. Differences between localStorage and sessionStorage regarding lifetime: Data stored through localStorage is permanent: it does not expire and remains stored on the user’s computer until a web app deletes it or the user asks the browser to delete it. sessionStorage has the same lifetime as the top-level window or browser tab in which the data got stored. When the tab is permanently closed, any data stored through sessionStorage is deleted. Differences between localStorage and sessionStorage regarding storage scope:
  • 13. Both forms of storage are scoped to the document origin so that documents with different origins will never share the stored objects. sessionStorage is also scoped on a per-window basis. Two browser tabs with documents from the same origin have separate sessionStorage data. Unlike in localStorage, the same scripts from the same origin can't access each other's sessionStorage when opened in different tabs. Q32: How would you choose between SOAP and REST web services? ★★★ Topic: SOA & REST API Web Services work on client-server model and when it comes to choose between SOAP and REST, it all depends on project requirements. Let’s look at some of the conditions affecting our choice: Do you know your web service clients beforehand? If Yes, then you can define a contract before implementation and SOAP seems better choice. But if you don’t then REST seems better choice because you can provide sample request/response and test cases easily for client applications to use later on. How much time you have? For quick implementation REST is the best choice. You can create web service easily, test it through browser/curl and get ready for your clients. What kind of data format are supported? If only XML then you can go with SOAP but if you think about supporting JSON also in future then go with REST. Q33: What are the best practices for caching? ★★★ Topic: SOA & REST API Always keep static contents like images, css, JavaScript cacheable, with expiration date of 2 to 3 days. Never keep expiry date too high. Dynamic contents should be cached for few hours only. Q34: What is Adapter Pattern? ★★★ Topic: Design Patterns Adapter pattern works as a bridge between two incompatible interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces (adaptees).
  • 14. A real life example could be a case of card reader which acts as an adapter between memory card and a laptop. You plugin the memory card into card reader and card reader into the laptop so that memory card can be read via laptop. Q35: State the features of an interface. ★★★ Topic: OOP An interface is a template that contains only the signature of methods. The signature of a method consists of the numbers of parameters, the type of parameter (value, reference, or output), and the order of parameters. An interface has no implementation on its own because it contains only the definition of methods without any method body. An interface is defined using the interface keyword. Moreover, you cannot instantiate an interface. The various features of an interface are as follows: An interface is used to implement multiple inheritance in code. This feature of an interface is quite different from that of abstract classes because a class cannot derive the features of more than one class but can easily implement multiple interfaces. It defines a specific set of methods and their arguments. Variables in interface must be declared as public, static, and final while methods must be public and abstract. A class implementing an interface must implement all of its methods. An interface can derive from more than one interface. Q36: What are the DRY and DIE principles? ★★★ Topic: Software Architecture In software engineering, Don't Repeat Yourself (DRY) or Duplication is Evil (DIE) is a principle of software development. Q37: What are the advantages and disadvantages of using "use strict"? ★★★
  • 15. Topic: JavaScript 'use strict' is a statement used to enable strict mode to entire scripts or individual functions. Strict mode is a way to opt into a restricted variant of JavaScript. Advantages: Makes it impossible to accidentally create global variables. Makes assignments which would otherwise silently fail to throw an exception. Makes attempts to delete undeletable properties throw (where before the attempt would simply have no effect). Requires that function parameter names be unique. this is undefined in the global context. It catches some common coding bloopers, throwing exceptions. It disables features that are confusing or poorly thought out. Disadvantages: Many missing features that some developers might be used to. No more access to function.caller and function.arguments. Concatenation of scripts written in different strict modes might cause issues. Overall, I think the benefits outweigh the disadvantages, and I never had to rely on the features that strict mode blocks. I would recommend using strict mode. Q38: Explain the difference between Object.freeze() vs const ★★★ Topic: JavaScript const and Object.freeze are two completely different things. const applies to bindings ("variables"). It creates an immutable binding, i.e. you cannot assign a new value to the binding. const person = { name: "Leonardo" }; let animal = { species: "snake" }; person = animal; // ERROR "person" is read-only Object.freeze works on values, and more specifically, object values. It makes an object immutable, i.e. you cannot change its properties. let person = { name: "Leonardo" }; let animal = { species: "snake" }; Object.freeze(person); person.name = "Lima"; //TypeError: Cannot assign to read only property 'name' of object console.log(person);
  • 16. Q39: What are the features of Microservices? ★★★ Topic: Microservices Decoupling – Services within a system are largely decoupled. So the application as a whole can be easily built, altered, and scaled Componentization – Microservices are treated as independent components that can be easily replaced and upgraded Business Capabilities – Microservices are very simple and focus on a single capability Autonomy – Developers and teams can work independently of each other, thus increasing speed Continous Delivery – Allows frequent releases of software, through systematic automation of software creation, testing, and approval Responsibility – Microservices do not focus on applications as projects. Instead, they treat applications as products for which they are responsible Decentralized Governance – The focus is on using the right tool for the right job. That means there is no standardized pattern or any technology pattern. Developers have the freedom to choose the best useful tools to solve their problems Agility – Microservices support agile development. Any new feature can be quickly developed and discarded again Q40: What is Hoisting in JavaScript? ★★★★ Topic: JavaScript Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q41: How does the “this” keyword work? Provide some code examples. ★★★★ Topic: JavaScript Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q42: Write a recursive function that performs a binary search ★★★★ Topic: JavaScript Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q43: What is “closure” in javascript? Provide an example? ★★★★ Topic: JavaScript Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q44: What is progressive rendering? ★★★★ Topic: HTML5 Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q45: What should be the purpose of OPTIONS method of RESTful web services? ★★★★ Topic: SOA & REST API
  • 17. Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q46: What is the difference between cohesion and coupling? ★★★★ Topic: OOP Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q47: What is GOD class and why should we avoid it? ★★★★ Topic: Software Architecture Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q48: Explain difference between: function Person(){}, var person = Person(), and var person = new Person()? ★★★★ Topic: JavaScript Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q49: Describe tree shaking mechanism in webpack ★★★★★ Topic: Webpack Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions) Q50: What does it mean to “program to an interface”? ★★★★★ Topic: OOP Read Full Answer on FullStack.Cafe (https://www.fullstack.cafeblogweb-developer-interview-questions)