Skip to content

Commit 3d96551

Browse files
committed
Update README.md
1 parent d4aa1f4 commit 3d96551

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ var events = require('events');
579579
var eventEmitter = new events.EventEmitter();
580580
```
581581

582-
Example
582+
*Example*:
583583

584584
```javascript
585585
// Import events module
@@ -757,7 +757,7 @@ All objects that emit events are members of EventEmitter class. These objects ex
757757

758758
When the EventEmitter object emits an event, all of the functions attached to that specific event are called synchronously. All values returned by the called listeners are ignored and will be discarded.
759759

760-
Example
760+
*Example*:
761761

762762
```javascript
763763
var events = require('events');
@@ -833,7 +833,7 @@ There are four types of streams
833833

834834
Each type of Stream is an EventEmitter instance and throws several events at different instance of times.
835835

836-
Example
836+
*Example*:
837837

838838
* **data** − This event is fired when there is data is available to read.
839839
* **end** − This event is fired when there is no more data to read.
@@ -983,10 +983,10 @@ console.log(decrypted);
983983
DNS is a node module used to do name resolution facility which is provided by the operating system as well as used to do an actual DNS lookup. No need for memorising IP addresses – DNS servers provide a nifty solution of converting domain or subdomain names to IP addresses. This module provides an asynchronous network wrapper and can be imported using the following syntax.
984984

985985
```javascript
986-
const dns = require('dns');
986+
const dns = require('dns');
987987
```
988988

989-
Example: `dns.lookup()` function
989+
*Example*: `dns.lookup()` function
990990

991991
```javascript
992992
const dns = require('dns');
@@ -996,7 +996,7 @@ dns.lookup('www.google.com', (err, addresses, family) => {
996996
});
997997
```
998998

999-
Example: `resolve4()` and `reverse()` functions
999+
*Example*: `resolve4()` and `reverse()` functions
10001000

10011001
```javascript
10021002
const dns = require('dns');
@@ -1014,7 +1014,7 @@ dns.resolve4('www.google.com', (err, addresses) => {
10141014
});
10151015
```
10161016

1017-
Example: print the localhost name using `lookupService()` function
1017+
*Example*: print the localhost name using `lookupService()` function
10181018

10191019
```javascript
10201020
const dns = require('dns');
@@ -1125,7 +1125,7 @@ There are two types of API functions in Node.js:
11251125

11261126
In a blocking operation, all other code is blocked from executing until an I/O event that is being waited on occurs. Blocking functions execute synchronously.
11271127

1128-
Example:
1128+
*Example*:
11291129

11301130
```javascript
11311131
const fs = require('fs');
@@ -1140,7 +1140,7 @@ The second line of code blocks the execution of additional JavaScript until the
11401140

11411141
In a non-blocking operation, multiple I/O calls can be performed without the execution of the program being halted. Non-blocking functions execute asynchronously.
11421142

1143-
Example:
1143+
*Example*:
11441144

11451145
```javascript
11461146
const fs = require('fs');
@@ -2049,8 +2049,9 @@ As a minimal framework, Express does not consider database integration as a requ
20492049

20502050
## 56Q. ***What are the Challenges with Node.js?***
20512051

2052-
**Challenges with Node.js Application Maintenance**
2053-
Improper maintenance of an application can result in issues related to stability or flexibility, often leading to the app’s failure. If the code is not well-written or if developers use outdated tools, the performance can suffer, and users might experience more bugs and app crashes. On top of that, poor-quality code can hamper the app’s scaling capacity and the further development of the application. In the worst case scenario, it might become impossible to introduce new features without rewriting the codebase from scratch.
2052+
**Challenges with Node.js Application Maintenance**
2053+
2054+
Improper maintenance of an application can result in issues related to stability or flexibility, often leading to the app\'s failure. If the code is not well-written or if developers use outdated tools, the performance can suffer, and users might experience more bugs and app crashes. On top of that, poor-quality code can hamper the app’s scaling capacity and the further development of the application. In the worst case scenario, it might become impossible to introduce new features without rewriting the codebase from scratch.
20542055

20552056
1. Extensive stack
20562057
2. Technical Debt
@@ -2069,7 +2070,7 @@ Improper maintenance of an application can result in issues related to stability
20692070

20702071
## 57Q. ***What is the difference between Node.js vs Ajax?***
20712072

2072-
**AJAX**
2073+
**1. AJAX**
20732074

20742075
AJAX stands for Asynchronous Javascript and XML, it’s used to allow web pages (client-side) to update asynchronously by communicating with a web server and by exchanging data. This essentially means that applications can talk to a server in the background of the application. It uses some core components to function:
20752076

@@ -2079,7 +2080,7 @@ AJAX stands for Asynchronous Javascript and XML, it’s used to allow web pages
20792080
1. JSON/XML for interchanging the data
20802081
1. Javascript to unify everything
20812082

2082-
**Node.js**
2083+
**2. Node.js**
20832084

20842085
Node.js allows the developers to develop a web application in a single language called JavaScript for both client side and server side.
20852086

@@ -2131,7 +2132,7 @@ async function add(x,y){
21312132

21322133
Async functions can make use of the await expression. This will pause the async function and wait for the Promise to resolve prior to moving on.
21332134

2134-
Example
2135+
*Example*:
21352136

21362137
```javascript
21372138
function doubleAfter2Seconds(x) {
@@ -2273,7 +2274,7 @@ callback functions are called when an asynchronous function returns its result,
22732274

22742275
**1. Callback**: A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
22752276

2276-
*Example:* synchronous callback
2277+
*Example*: synchronous callback
22772278

22782279
```js
22792280
function greeting(name) {
@@ -2290,7 +2291,7 @@ processUserInput(greeting);
22902291

22912292
**2. Events**: Every action on a computer is an event. Node.js allows us to create and handle custom events easily by using events module. Event module includes `EventEmitter` class which can be used to raise and handle custom events.
22922293

2293-
*Example:*
2294+
*Example*:
22942295

22952296
```js
22962297
var event = require('events');

0 commit comments

Comments
 (0)