0% found this document useful (0 votes)
8 views

Simple Answers

The document outlines key programming concepts including polymorphism, abstract classes, and the hooks concept in React. It discusses Node.js as a server-side runtime environment, its advantages and disadvantages, and its use in building applications and APIs. Additionally, it covers database types (SQL vs NoSQL), error types, and provides a simple JavaScript code example.

Uploaded by

sagar rajbhar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Simple Answers

The document outlines key programming concepts including polymorphism, abstract classes, and the hooks concept in React. It discusses Node.js as a server-side runtime environment, its advantages and disadvantages, and its use in building applications and APIs. Additionally, it covers database types (SQL vs NoSQL), error types, and provides a simple JavaScript code example.

Uploaded by

sagar rajbhar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Polymorphism: The ability in programming to present the same interface for


different underlying data types.

2. Abstract: A class or function that is incomplete and meant to be extended or


implemented by others.

3. Hooks Concept: In React, hooks let you use state and lifecycle features in
functional components (e.g., useState, useEffect).

4. Node.js: A runtime environment that allows JavaScript to be run on the server


side, outside of a web browser.

5. Where Node.js is frequently used: Commonly used for building server-side


applications, APIs, and real-time applications like chat apps.

6. Alternative to Node.js: Some alternatives include Django (Python), Ruby on Rails


(Ruby), ASP.NET (C#), and Deno (also JavaScript/TypeScript).

7. Advantages and Disadvantages of Node.js:


- Advantages: Fast performance, easy to scale, good for real-time apps.
- Disadvantages: Single-threaded (limits CPU-heavy tasks), callbacks can get
messy.

8. API function in Node.js: A function or endpoint that allows communication


between different software applications, often using HTTP requests.

9. Event Loop: Node.js uses an event loop to handle asynchronous operations,


allowing it to handle multiple tasks without blocking.

10. Middleware: Functions in Node.js (particularly Express.js) that process


requests between receiving the request and sending a response.

11. Hosting in JavaScript: Hosting JavaScript apps usually involves platforms like
Vercel, Netlify, or traditional servers for Node.js apps.

12. SQL and NoSQL:


- SQL: Structured Query Language databases like MySQL; data is organized in
tables with rows and columns.
- NoSQL: Non-relational databases like MongoDB; data can be stored as
documents, graphs, or key-value pairs.

13. Dependency of Node.js: Node.js projects often rely on NPM (Node Package
Manager) libraries, which add extra features or functionalities.

14. Operational vs Programming Error:


- Operational: Errors caused by environmental issues (e.g., network failure).
- Programming: Bugs in the code that cause errors (e.g., syntax errors).

15. Higher-Order Function: A function that takes other functions as arguments or


returns a function (e.g., map, filter).

16. Promise: An object representing the eventual completion or failure of an


asynchronous operation.

17. MongoDB: A NoSQL database that stores data in JSON-like documents, offering
flexibility in data structure.

18. Small JavaScript Code Example:


```javascript
// Simple function to add two numbers
function add(a, b) {
return a + b;
}
console.log(add(3, 5)); // Output: 8
```

You might also like