Interview Questions
Interview Questions
Full Stack development involves developing both the front end and back end of the
web application/website at the same time. This process includes three layers:
• Business logic layer (backend part refers to the server side of the application)
• Database layer.
A Full Stack Web Developer is a person who is familiar with developing both
client and server software. In addition to mastering CSS and HTML, they are
To fully comprehend the role of Full Stack developer, you must understand the
The front end comprises a visible part of the application in which the user
Some of the popular tools used by full-stack developers to make development more
• Backbone
• WebStorm
• Slack
• Electron
• TypeScript
• CodePen
• GitHub
4. What skills do you need to be a full-stack developer?
Basic languages - Must be proficient in basic languages like HTML, CSS, and
SQL.
Front-end frameworks - BootStrap, AngularJS, VueJS, ReactJS, JavaScript,
TypeScript, Python, Ruby, PHP
Back-end frameworks - Express, Django, NodeJS, Ruby on Rails
Databases - MySQL, SQLite, Postgres, MongoDB, Cassandra, Apache storm,
Sphinx
Additional skills recommended - Git, Machine Learning, SSH, Linux Command,
Data Structures, Character encoding.
the "driver" writes the code. The other programmer is the "navigator" who
views each line of the code written, spell check, and proofread it. Also,
programmers will swap their roles every few minutes and vice-versa.
6. What is CORS?
Web scripts can be integrated using CORS when it requests a resource that
for defining a pattern that is used for decoupling components and layers in the
involves automatic tools that state new code's correctness before integration.
be able to go through this with ease. The core difference is GraphQL doesn't
dependency between objects, as when an object changes the state, then all its
dependents are notified and updated automatically. The object that watches on
the state of another object is called the observer, and the object that is being
interface (API or web API) that uses HTTP requests to obtain and manage
information. That data can be used to POST, GET, DELETE, and OUT data
services.
HTML stands for HyperText Markup Language and is the language of the
internet. It is the standard text formatting language used for creating and
displaying pages on the Internet
HTML documents are made up of the elements and the tags that format it
for proper display on pages.
We use HTML tags for placing the elements in the proper and appropriate
format. Tags use the symbols <, and > to set them apart from the HTML
content.
The HTML tags need not be closed always. For example, in the case of
images, the closing tags are not required as <img> tag.
Attributes are the properties that can be added to an HTML tag. These
attributes change the way the tag behaves or is displayed. For example, a
<img> tag has an src attribute, which you use to add the source from which
the image should be displayed.
We add attributes right after the name of the HTML tag, inside the brackets.
We can only add the attributes to opening or self-closing tags, but never be
in closing tags.
text up, down, left, or right automatically. To apply for a marquee, you have
• Ordered list–The ordered list uses <ol> tag and displays elements in a
numbered format.
• Unordered list–The unordered list uses <ul> tag and displays elements
in a bulleted format.
• Definition list–The definition list uses <dl>, <dt>, <dd> tags and displays
elements in definition form like in a dictionary.
17. Differentiate between an Ordered list and an Unordered list?
An unordered list uses <ul> </ul> tags and each element of the list is written
between <li> </li> tags. The list items are displayed as bullets rather than
numbers.
An ordered list uses <ol> </ol> tags and each element of the list is written
between <li> </li> tags. The list items are displayed as numbers rather than
bullet points.
<!DOCTYPE html>
<html>
<body>
<h2>HTML List Example</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
18. How to create a hyperlink in HTML?
We use the anchor tag <a> to create a hyperlink in HTML that links one page to
another page.
syntax:
<a href=”www.novitech.com”>NoviTech</a>
19. Which HTML tag is used to display the data in the tabular form?
20. What is the Box model in CSS? Which CSS properties are a part of it?
model is used to determine the height and width of the rectangular box.
The CSS Box consists of Width and height (or in the absence of that,
Content: Actual Content of the box where the text or image is placed.
Padding: Area surrounding the content (Space between the border and
content).
Border: Area surrounding the padding.
Margin: Area surrounding the border.
Using link tag, we can link the style sheet to the HTML page.
2 - Embed CSS with a style tag: A set of CSS styles included within your
HTML page.
<style type="text/css">
/*Add style rules here*/
</style>
Add your CSS rules between the opening and closing style tags and write
your CSS exactly the same way as you do in stand-alone stylesheet files.
HTML tag.): Style can be added directly to the HTML element using a style
tag.
4 - Import a stylesheet file (An external file imported into another CSS file):
Another way to add CSS is by using the @import rule. This is to add a new
@import "path/to/style.css";
The main difference between CSS3 and CSS2 is that CSS divides
different sections into modules and supports many browsers. It also
contains new General Sibling Combinators responsible for matching
similar elements.
CSS frameworks are libraries that make web page styling easier. Some of
Block Elements are <div> and <p>. They usually start on a new line
and can take space for an entire row or width.
Inline elements are <a>, <span>, <strong>, and <img> tags. They don't
start on a new line. However, they appear on the same line as the content
and tags beside them.
Inline block elements have padding and margins and set height and width
values. Though, they are similar to inline elements.
The float property of CSS positions an image to the right or left as needed,
including text wrapping around it. All properties of elements used before
it remain unchanged.
used mainly for enhancing the interaction of a user with the webpage. In
other words, you can make your webpage more lively and interactive,
with the help of JavaScript. JavaScript is also being used widely in game
1. Number
2. String
3. Boolean
4. Undefined
5. Null
6. Symbol (ES6 and later)
7. Object
9. Function
are moved to the top of their containing scope during the compilation
phase. This allows you to use variables and functions before they are
Variables declared with var are hoisted to the top of their scope, while let
common type.
=== is the strict equality operator that checks both value and type,
ensuring that values are of the same type without performing type
coercion.
Function Declaration
Function Expression
Arrow Function
Explorer.
console.log('Hello, World!');
45. What are the key differences between Java and JavaScript? / How is
development.
body
paragraph.appendChild(text);
document.body.appendChild(paragraph);
51. Difference between Client side JavaScript and Server side JavaScript
Server-side JavaScript runs on the server and is used for tasks such as
53. What is the difference between undefined value and null value?
undefined is a variable that has been declared but has not been assigned
a value.
object value.
the code.
70. What are the differences between class and functional components?
Class Components:
• Can have state and lifecycle methods.
• Defined using ES6 class syntax.
• Requires the use of this keyword to access props and state.
Functional Components:
• Primarily used for presenting UI.
• Introduced in React as a simpler way to write components.
• Cannot have state or lifecycle methods until the introduction of
Hooks in React 16.8.
71. Explain the difference between frontend and backend development?
Frontend Development:
• Focuses on the user interface and user experience of a website or
application.
• Involves building and designing elements that users interact with
directly.
• Technologies include HTML, CSS, and JavaScript.
Backend Development:
• Concerned with server-side operations, databases, and the overall
logic of the application.
• Involves server-side scripting, database management, and server
configuration.
• Technologies include server-side languages like Node.js, Python,
PHP, and databases like MySQL or MongoDB.
$ mongod
$ mongo
MongoDB shell version: 4.2.0
connecting to: test
>
> x = 100;
200
> x / 5;
20
107.How to add data in MongoDB?
The CRUD API in MongoDB provides deleteOne and deleteMany for this
purpose. Both of these methods take a filter document as their first
parameter. The filter specifies a set of criteria to match against in
removing documents.
For example:
> db.books.deleteOne({"_id" : 3})
Example:
> db.users.find({"age" : 24})
Despite MySQL and MongoDB being freeware and open source databases,
there are several differences between them in terms of a data relationship,
transaction, performance speed, querying data, schema design,
normalization, etc. The comparison between MongoDB and MySQL is similar
to the comparison between Non-relational and Relational databases.
• High Performance
• High Availability
• Easily Scalable
• Document Oriented
115. Which languages can we use with MongoDB?
At Present, MongoDB offers driver support to C++, Java, PHP, Perl, Python,
Go, Scala, and Ruby.
116.Define Collection?
We use the “DB” command to get the name of the presently selected
database.
In MongoDB, the `_id` field serves as the primary key for a document. It
must be unique within a collection and is automatically generated if not
provided during document insertion.
You can delete data from a MongoDB collection using methods like
`deleteOne()`, `deleteMany()`, or `findOneAndDelete()`. You specify a query to
select the documents to delete.
INTERMEDIATE
1. Syntax error: Syntax errors are mistakes or spelling problems in the code
that cause the program to not execute at all or to stop running halfway
through. Error messages are usually supplied as well.
2. Logical error: Reasoning mistakes occur when the syntax is proper but the
logic or program is incorrect. The application executes without problems
in this case. However, the output findings are inaccurate. These are
sometimes more difficult to correct than syntax issues since these
applications do not display error signals for logic faults.
Browser Object Model is known as BOM. It allows users to interact with the
browser. A browser's initial object is a window. As a result, you may call all of the
window's functions directly or by referencing the window. The document,
history, screen, navigator, location, and other attributes are available in the
window object.
• Generator functions are run by their generator yield by yield which means one output at
a time, whereas Async-await functions are executed sequentially one after another.
• Async/await provides a certain use case for Generators easier to execute.
• The output result of the Generator function is always value: X, done: Boolean, but the
return value of the Async function is always an assurance or throws an error.
128. What are JavaScript Data Types?
• Primitive
• Numbers
• Strings
• Boolean
• Symbol
• Trivial
• Undefined
• Null
• Composite
• Objects
• Functions
• Arrays
129.What is the use of the isNaN function?
The number isNan function determines whether the passed value is NaN
(Not a number) and is of the type “Number”. In JavaScript, the value NaN
is considered a type of number. It returns true if the argument is not a
number, else it returns false.
130. What do you mean by NULL in JavaScript?
JavaScript has vast libraries and frameworks that can be widely used to develop
games and web-based applications.
• speech
• audio
• visual
• tactile media
• interactive media
Responsive Design is a web page creation approach that uses flexible images,
flexible layouts, and CSS media queries. This design approach aims to build web
pages that detect the orientation and screen size of the visitors so that the layout
can be changed accordingly.
138. What are the different types of Selectors in CSS?
Calc can be used to specify the result of the mathematical operation of two or
more elements. For example to specify the width elements by the addition of two
or more elements, we can write as
.foo {
Width: calc(100px+50px)
The style “!important” in the CSS has the highest precedence. Also, the cascaded
property will be overridden with it.
142. Does this property work overflow: hidden?
Overflow: the hidden property is used to specify the content’s clipping. We need to
add scrollbars to the content area at the time of specified container size exceeding
the content limit where the content gets enclosed. This makes the content invisible
via clipping; also the overflow value will be hidden.
The main difference is that relative is used for the same tag in CSS. If we write
right:20 px, then padding shifts 20 px in the right. Whereas absolute is relative to
the non-static parent, i.e., if we write right:20 px, the result will be 20 px far from
the right edge of the parent element.
HSL: HSL stands for Hue, Saturation, and Lightness respectively. This
format uses the cylindrical coordinate system.
• Hue: Hue is the degree of the color wheel. Its value lies
between 0 to 360 where 0 represents red, 120 represents
green and 240 represents a blue color.
• Saturation: It takes a percentage value, where 100%
represents completely saturated, while 0% represents
completely unsaturated (gray).
• Lightness: It takes a percentage value, where 100% represents
white, while 0% represents black.
Syntax:
h1 {
color:hsl(H, S, L);
}
146. Can we add 2D transformations to our project using CSS?
Yes, we can, a transformation modifies an element by its shape, size, and
position. It transforms the elements along the X-axis and Y-axis.
There are six main types of 2D transformations which are listed below:
• translate()
• rotate()
• scale()
• skewX()
• skewY()
• matrix()
There are three main types of transformation which are listed below:
• rotateX()
• rotateY()
• rotateZ()
149. How would you style an image or element to have rounded corners?
Use the border-radius property to add rounded corners to an image. 50% will
make the image circular.
border-radius: 50%;
150. What does CSS selector mean?
They are:
• Font-style
• Font-variant
• Font-weight
• Font-size/line-height
• Font-family
• Caption
• Icon
• Height
• Max-height
• Max-width
• Min-height
• Min-width
• Width
154.Can web browsers read JSX directly?
• Web browsers cannot read JSX directly. This is because they are built to only read
regular JS objects and JSX is not a regular JavaScript object
• For a web browser to read a JSX file, the file needs to be transformed into a regular
JavaScript object. For this, we use Babel
React Router is a routing library built on top of React, which is used to create
routes in a React application. This is one of the most frequently asked react
interview questions.
No, it uses an HTML-in JavaScript syntax called JSX (JavaScript and XML)
that converts HTML tags to React elements.
159. What is the release date of React?
March 2013
Where ReactJS is a front end open-source JavaScript library for UIs, React
Native is an open-source mobile framework for platforms such as Android
and iOS.
No, as props are immutable and top-down. This signifies that parent can
transmit prop values to a child but the latter can’t modify them.
It lets you analyze the component hierarchy and includes component props
and state. You can find React Dev Tools both as a standalone app and as a
browser extension.
• Function component
• Class component
168. What are the lifecycle steps of React?
• Initialization
• State/Property updates
Babel, is a JavaScript compiler that converts latest JavaScript like ES6, ES7
into plain old ES5 JavaScript that most browsers understand.
170. What are the major issues of using MVC architecture in React?
Here are the major challenges you will face while handling MVC architecture:
• render()
• hydrate()
• createPortal()
• unmountComponentAtNode()
• findDOMNode()
HTTP status code 504 indicates that the server is unable to process the
request. This can be due to several reasons, such as an overloaded server
or a network issue.
You can include an HTTP server in your Node module by using the http
module. The http module provides an API for creating and interacting with
HTTP servers and clients. It allows you to handle incoming HTTP requests
and send HTTP responses, as well as control the server's behavior, such as
listening on a specific port and setting various options.
Error-first callbacks are used to pass errors and data. The first argument is
always an error object that the programmer has to check if something went
wrong. Additional arguments are used to pass data.
All objects that emit events are members of EventEmitter class. These
objects expose an eventEmitter.on() function that allows one or more
functions to be attached to named events emitted by the object.
When the EventEmitter object emits an event, all of the functions attached
to that specific event are called synchronously.
The event loop is a crucial part of Node.js, responsible for handling I/O
operations asynchronously. It allows Node.js to perform non-blocking
operations, making it highly efficient for handling concurrent requests. The
event loop continuously checks the event queue for any pending events.
When an event is detected, it's processed, and its associated callback
function is executed. This cycle repeats, allowing Node.js to handle multiple
operations concurrently without blocking the execution thread.
185. What is the purpose of the http module in Node.js? How can you create an
HTTP server using it?
• The http module is used to create HTTP servers and make HTTP requests
in Node.js. An HTTP server can be created by calling http.createServer()
and providing a request listener function.
186. Explain the difference between npm and yarn. When would you choose
one over the other?
• npm and yarn are package managers for Node.js. npm is the default
package manager for Node.js, while yarn is a newer alternative. The
choice between them often depends on factors like speed, dependency
resolution, and features.
189.What are TTL indexes in MongoDB? How can you use them to expire
documents?
190. Explain the difference between a primary key and a shard key in MongoDB.
LEFT JOIN: Returns all rows from the left table and the matched rows from
the right table. If there is no match, NULL values are returned for the
columns from the right table.
RIGHT JOIN: Returns all rows from the right table and the matched rows
from the left table. If there is no match, NULL values are returned for the
columns from the left table.
194.What are indexes in MySQL, and how do they improve query performance?
Indexes are data structures that improve the speed of data retrieval
operations on database tables. They provide a quick way to look up data
based on the values of specific columns. Indexes help reduce the number of
rows that need to be scanned during query execution, resulting in faster
query performance.
GROUP BY: Groups rows that have the same values into summary rows,
typically for use with aggregate functions like COUNT, SUM, AVG, etc.
196.Explain the difference between CHAR and VARCHAR data types in MySQL.
• CHAR: Fixed-length character data type that stores strings with a specified
length. Trailing spaces are padded to fill the remaining space.
• VARCHAR: Variable-length character data type that stores strings with a
maximum length specified during column definition. It only uses as much
storage space as needed for the actual data, without padding with spaces.
197. What is the purpose of the UNION operator in MySQL?
• The UNION operator is used to combine the result sets of two or more
SELECT statements into a single result set. It removes duplicate rows by
default. If you want to include duplicates, you can use UNION ALL.
198. What are triggers in MySQL, and how are they used?
• The ENUM data type in MySQL allows you to define a list of permissible
values for a column. It restricts the values that can be inserted into the
column to only those specified in the ENUM list.
200. What is the difference between a subquery and a join in MySQL? When
would you use each?