Skip to content

Commit 05eac1b

Browse files
committed
fix grammer and typos of various sections of chapter
1 parent e14ff25 commit 05eac1b

File tree

12 files changed

+7
-19
lines changed

12 files changed

+7
-19
lines changed

β€Žen/error-handling/README.mdβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ One of the common error handling techniques is the try...catch block, which is d
5858
* [try...catch](./try...-catch.md)
5959
* [try...catch...finally](./try...catch...finally.md)
6060

61-
## Conclusion
6261
Error handling is a critical aspect of JavaScript development.
6362
By understanding the types of errors, and following best practices,
6463
you can write more reliable and user-friendly applications.

β€Žen/es6-concepts/let-const.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ In ES5, JavaScript primarily used the `var` keyword for variable declaration. He
5757
4. **Constants:**
5858
- ES6 (`const`): ES6 introduces the `const` keyword, allowing the creation of constants, which cannot be changed after their initial assignment.
5959

60-
In summary, `let` and `const` in ES6 provide more predictable and controlled variable scoping compared to `var` in ES5. They help avoid common issues associated with variable hoisting and provide the flexibility to choose between mutable and immutable variables based on your needs.
60+
`let` and `const` in ES6 provide more predictable and controlled variable scoping compared to `var` in ES5. They help avoid common issues associated with variable hoisting and provide the flexibility to choose between mutable and immutable variables based on your needs.

β€Žen/file-system/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ fs.writeFileSync("test.txt","mahima is good girl",() => {
5757
})
5858

5959
```
60-
In summary, Node.js provides both synchronous and asynchronous file I/O options. Asynchronous I/O is typically preferred for better performance and responsiveness, while synchronous I/O is used only when necessary and with caution, as it can block the program's execution.
60+
Node.js provides both synchronous and asynchronous file I/O options. Asynchronous I/O is typically preferred for better performance and responsiveness, while synchronous I/O is used only when necessary and with caution, as it can block the program's execution.

β€Žen/functions/closures.mdβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ Closures have various practical use cases in JavaScript, including:
5858

5959
- **Callback Functions**: Callbacks often involve closures to maintain context and data between asynchronous operations.
6060

61-
## Summary
62-
6361
Closures are a powerful feature in JavaScript that allows functions to retain access to variables from their containing scope. Understanding closures is essential for writing clean and efficient code. They are commonly used in various design patterns and provide solutions for data encapsulation, function factories, and more.
6462

6563
Closures can be both a powerful tool and a potential source of memory leaks if not used wisely. Therefore, it's crucial to grasp the concept and use it judiciously in your JavaScript code.

β€Žen/functions/recursive-functions.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ function fibonacci(n) {
5252
fibonacci(5); // Returns 5
5353
```
5454

55-
In conclusion, recursive functions are a valuable tool in JavaScript for solving problems that involve repetitive subtasks. When used correctly, they can lead to elegant and efficient solutions.
55+
Recursive functions are a valuable tool in JavaScript for solving problems that involve repetitive subtasks. When used correctly, they can lead to elegant and efficient solutions.

β€Žen/miscellaneous/Added getters and setters.mdβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,4 @@ person.lang = "en";
5757
document.getElementById("demo").innerHTML = person.language;
5858
```
5959

60-
## Conclusion
61-
getters and setters in JavaScript are powerful tools that enable us to control access to object properties and provide additional functionality. Getters allow us to retrieve property values with custom logic, while setters enable us to validate and modify incoming values. By using getters and setters, we can maintain data encapsulation, enhance security, and ensure the integrity of our objects.
60+
`getters` and `setters` in JavaScript are powerful tools that enable us to control access to object properties and provide additional functionality. Getters allow us to retrieve property values with custom logic, while setters enable us to validate and modify incoming values. By using getters and setters, we can maintain data encapsulation, enhance security, and ensure the integrity of our objects.

β€Žen/miscellaneous/ECMA-script.mdβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ This section of the document elaborates on why ECMAScript is crucial for JavaScr
101101

102102
- **Map**: `const x = new Map([ ["a", 500],["b", 300],["c", 200] ]);`
103103

104-
## Conclusion
105104

106105
ECMAScript is a fundamental part of web development, shaping how we create dynamic and interactive web applications. Staying informed about the latest ECMAScript features is essential for modern JavaScript development.
107106
ECMAScript plays a crucial role in providing a standardized foundation for JavaScript, ensuring consistency, interoperability, and continuous improvement of the language. This standardization allows developers to write JavaScript code with confidence, knowing that it will work reliably across different platforms and environments.

β€Žen/miscellaneous/api-ajax.mdβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ Remember to host your HTML and JavaScript files on a web server if you plan to a
166166
That's it! You've successfully fetched and displayed weather data using the OpenWeatherMap API and AJAX.
167167

168168

169-
## Conclusion
170-
171169
APIs play a crucial role in modern software development by enabling applications to collaborate and share data effectively. Understanding how to use APIs and integrate them into your projects is fundamental for building feature-rich and interconnected software.
172170

173171
AJAX is a foundational technology in modern web development that empowers developers to create dynamic and responsive web applications. While the name suggests XML, AJAX is compatible with various data formats, making it a versatile tool for enhancing the user experience and creating interactive web applications.

β€Žen/miscellaneous/callback.mdβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ asyncOperation1(function (result1) {
104104

105105
- Organize code into smaller, reusable modules. This reduces the complexity of individual functions and makes it easier to manage asynchronous operations.
106106

107-
## Conclusion
108107

109108
Effective error handling is crucial in asynchronous programming. Callbacks can handle errors by convention, but alternative approaches like Promises, async/await, and event emitters provide more structured and readable ways to manage asynchronous code. The choice of which approach to use depends on the specific requirements and coding style preferences.
110109
Callback hell is a common issue in JavaScript when working with deeply nested callback functions for handling asynchronous operations. It can lead to code that is challenging to read, maintain, and debug. Mitigation strategies, such as using named functions, Promises, async/await, or modularization, can significantly improve code structure and readability when dealing with asynchronous tasks, making your code more maintainable and error-resistant.

β€Žen/miscellaneous/single-thread-nature.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ In this example, we demonstrate the single-threaded nature of JavaScript and how
8484
- Callback Hell: Excessive use of callbacks (often referred to as "callback hell") can make the code harder to read and maintain.
8585
- Concurrency Bottleneck: CPU-bound tasks cannot fully utilize multi-core processors because JavaScript runs in a single thread.
8686

87-
In summary, 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.
87+
88+
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 commit comments

Comments
Β (0)