Skip to content

Commit

Permalink
fixing layout issue on basic-level and sing-thread-nature content
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jun 25, 2024
1 parent e201c1d commit ae7402a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions en/interview-questions/basic-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ var obj2 = obj;

# 3. Data Types and Operator

### 3.1. What are the different data types present in javascript?
### 3.1. What are the different data types present in JavaScript?

**Answer:**
**Answer:** The different data types present in JavaScript are as follows:

1. **Primitive types**

Expand Down
10 changes: 5 additions & 5 deletions en/miscellaneous/single-thread-nature.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ In this example, we demonstrate the single-threaded nature of JavaScript and how

### Benefits:

- Simplicity: Single-threaded execution simplifies the programming model and reduces the risk of complex concurrency-related bugs.
- Predictability: The single-threaded nature makes it easier to reason about the order of execution and the state of your program.
- **Simplicity:** Single-threaded execution simplifies the programming model and reduces the risk of complex concurrency-related bugs.
- **Predictability:** The single-threaded nature makes it easier to reason about the order of execution and the state of your program.

### Challenges:

- Blocking Operations: Long-running operations can potentially block the main thread, leading to a poor user experience, especially in web applications.
- Callback Hell: Excessive use of callbacks (often referred to as "callback hell") can make the code harder to read and maintain.
- Concurrency Bottleneck: CPU-bound tasks cannot fully utilize multi-core processors because JavaScript runs in a single thread.
- **Blocking Operations:** Long-running operations can potentially block the main thread, leading to a poor user experience, especially in web applications.
- **Callback Hell:** Excessive use of callbacks (often referred to as "callback hell") can make the code harder to read and maintain.
- **Concurrency Bottleneck:** CPU-bound tasks cannot fully utilize multi-core processors because JavaScript runs in a single thread.


JavaScript's single-threaded nature is a defining feature of the language. While it simplifies certain aspects of programming, it also presents challenges in terms of handling asynchronous tasks and ensuring responsive applications. Effective use of asynchronous patterns and understanding the event-driven model are essential for JavaScript developers.

0 comments on commit ae7402a

Please sign in to comment.