HTML
Javascript
Node js
Mongodb
Expressjs
100

What is the difference between <div> and <section>?

Answer:
<div> is a generic container with no semantic meaning.
<section> represents a meaningful section of a webpage, usually with a heading.

100

 What is hoisting in JavaScript?


Answer:
Hoisting is JavaScript's behavior where declarations are processed before code execution.

100

What is npm?

npm stands for Node Package Manager. It is used to install and manage packages/libraries for Node.js projects.

100

What is package.json?

Answer:
package.json contains important information about a Node.js project, such as:

  • Project name
  • Version
  • Dependencies
  • Scripts
  • Project configuration
100

What is middleware in Express?

Answer:

Middleware is a function that has access to the request, response, and the next middleware function.

next() passes control to the next middleware/route handler.

200

What is semantic HTML?


Answer:
Semantic HTML uses tags that clearly describe their meaning.

<header> , <nav> , <main>, <section>,<article>, <footer>

200

What is a closure?

Answer:
A closure occurs when a function remembers variables from its outer lexical scope even after the outer function has finished executing.

200

What is the difference between dependencies and devDependencies?

Answer:

 - dependencies are packages needed by the application at runtime. 

- devDependencies are generally needed during development, testing, or building.

200

What are indexes and why use them?

Answer : 

Special data structures that store a subset of data to speed up queries and avoid full collection scans.

200

Why do we use Node.js?

Answer:
Node.js is commonly used to:

  • Build backend servers
  • Create REST APIs
  • Handle HTTP requests
  • Connect applications with databases
  • Build real-time applications
300

What is the difference between id and class?


Answer:

  • id should generally be unique on a page.
  • class can be used on multiple elements.
300

 What is a Promise?


Answer:
A Promise represents the eventual completion or failure of an asynchronous operation.

pending , fulfilled , rejected

300

What is the difference between process.env and normal variables?

Answer :
process.env provides access to environment variables.
Environment variables are commonly used for configuration such as:

300

Why use Mongoose?

Answer : 

Schema creation Validation Easy database operations

300

What happens if you don't call next() in middleware?


 

Answer:
The request will usually stop at that middleware and the client may keep waiting until a response is sent.

400

What is the purpose of the <meta name="viewport"> tag?

Answer:
It helps webpages display correctly on mobile devices.

<meta name="viewport" content="width=device-width, initial-scale=1.0">


400

What is the event loop?  

Answer:
The event loop allows JavaScript to handle asynchronous operations while JavaScript itself executes code on a single main thread.

400

What is node_modules?

Answer:
node_modules is the folder where npm stores the packages installed in the project.

400

Difference between Schema and Model?

Answer : 

Schema: Defines structure. 

Model: Performs database operations.

400

What is the difference between app.use() and app.get()?


Answer:

app.use() is mainly used for middleware and can work with multiple HTTP methods.

500

 What is an iframe?

Answer:
An <iframe> embeds another webpage or document inside the current webpage.

<iframe src="https://example.com"></iframe>
500

What is the difference between map(), filter(), and reduce()?

Answer
map() transforms every element:

filter() selects elements:

reduce() combines values:

500

What is res?

Answer:

The res (response) object represents the HTTP response that an Express app sends when it gets an HTTP request. It is used to send data back to the client, such as JSON data (res.json()), status codes (res.status()), or HTML pages (res.send()).

500

How do you find documents?

By using the db.collection.find() method.

500

What is req?

The req (request) object represents the HTTP request and contains properties for the request query string, parameters, body, HTTP headers, cookies, and other incoming data from the client.