Skip to content

Commit d0cf189

Browse files
chore: sync content to repo (#10064)
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
1 parent c75b927 commit d0cf189

126 files changed

Lines changed: 304 additions & 621 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# Value Comparison Operators
2-
3-
In javascript, the `==` operator does the type conversion of the operands before comparison, whereas the `===` operator compares the values and the data types of the operands. The `Object.is()` method determines whether two values are the same value: `Object.is(value1, value2)`.
4-
5-
`Object.is()` is not equivalent to the `==` operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `"" == false` being `true`), but `Object.is()` doesn't coerce either value.
6-
7-
`Object.is()` is also not equivalent to the `===` operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal but treats `NaN` as not equal to each other.
1+
# ==
2+
3+
The `==` operator compares two values for equality after performing type coercion if the types differ. For example, `"5" == 5` returns `true` because the string is converted to a number before comparison. This can produce surprising results and is generally avoided in favor of `===`.
84

95
Visit the following resources to learn more:
106

11-
- [@article@Equality comparisons and sameness - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is)
7+
- [@article@Equality comparisons and sameness - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is)
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
# Strict Equality Operator (===)
1+
# ===
2+
3+
The `===` operator compares two values for equality without type coercion. Both the value and the type must match for the comparison to return `true`. It is the recommended equality operator for most cases because it produces predictable results.
24

3-
In JavaScript, the strict equality operator `===` compares both the value and the type of two operands. This means that it will only return true if both the value and the type are identical.
5+
Visit the following resources to learn more:
46

5-
```sh
6-
"5" === "5" // true
7-
```
8-
9-
In this case, both the value and the type are the same, so the result is true.
10-
11-
```sh
12-
"5" === 5 // false
13-
```
14-
15-
Here, although the values might appear similar, the types are different (string and number), so the result is false. The strict equality operator does not perform type coercion; both the value and the type must be identical.
16-
17-
Learn more from the following resources:
18-
19-
- [@article@Strict equality - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality)
7+
- [@article@Strict equality - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality)
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# Javascript Variables
2-
3-
Most of the time, a JavaScript application needs to work with information. To store and represent this information in the JavaScript codebase, we use variables. A variable is a container for a value.
1+
# All about Variables
2+
3+
Variables are named containers for storing data values in a program. In JavaScript, variables are declared using `var`, `let`, or `const`, each with different scoping and reassignment rules. Choosing the right declaration keyword affects how the variable behaves throughout the code.
44

55
Visit the following resources to learn more:
66

77
- [@article@JavaScript Variables](https://javascript.info/variables)
8-
- [@article@Storing the information you need — Variables](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables)
9-
- [@feed@Explore top posts about JavaScript](https://app.daily.dev/tags/javascript?ref=roadmapsh)
8+
- [@article@Storing the information you need — Variables](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables)

src/data/roadmaps/javascript/content/apply@-BtF34cEzI6J8sZCDRlRE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The apply() method of Function instances calls this function with a given this v
44

55
Visit the following resources to learn more:
66

7-
- [@article@apply() - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
7+
- [@article@apply() - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)

src/data/roadmaps/javascript/content/arguments-object@QLC7bW-qHskLH2HOA-Sko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The arguments object is an Array-like object accessible inside functions that co
44

55
Visit the following resources to learn more:
66

7-
- [@article@The arguments object - MDN Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments)
7+
- [@article@The arguments object - MDN Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments)
Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
# Arithmetic operators
2-
3-
The Arithmetic operators perform addition, subtraction, multiplication, division, exponentiation, and remainder operations.
4-
5-
Arithmetic operators in JavaScript are as follows:
6-
7-
- `+` (Addition)
8-
- `-` (Subtraction)
9-
- `*` (Multiplication)
10-
- `**` (Exponentiation)
11-
- `/` (Division)
12-
- `%` (Modulus i.e. Remainder)
13-
- `++` (Increment)
14-
- `--` (Decrement)
1+
# Arithmetic Operators
2+
3+
Arithmetic operators perform mathematical operations on numbers. They include `+` (addition), `-` (subtraction), `*` (multiplication), `/` (division), `%` (remainder), and `**` (exponentiation). The `+` operator is also used for string concatenation, which can cause issues when operands are mixed types.
154

165
Visit the following resources to learn more:
176

187
- [@article@Arithmetic Operators - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#arithmetic_operators)
19-
- [@article@Arithmetic Operators - JavaScript.info](https://javascript.info/operators#maths)
8+
- [@article@Arithmetic Operators - JavaScript.info](https://javascript.info/operators#maths)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Arrays
2-
3-
Arrays are objects that store a collection of items and can be assigned to a variable. They have their methods that can perform operations on the array.
2+
3+
Arrays are ordered, indexed collections that can hold values of any type. JavaScript arrays are dynamic, meaning they can grow and shrink, and provide a rich set of built-in methods like `map()`, `filter()`, `reduce()`, `push()`, and `pop()`. They are one of the most used data structures in JavaScript.
44

55
Visit the following resources to learn more:
66

77
- [@article@Working with Arrays in JavaScript](https://javascript.info/array)
88
- [@article@JavaScript Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
9-
- [@video@JavaScript Arrays](https://www.youtube.com/watch?v=oigfaZ5ApsM)
9+
- [@video@JavaScript Arrays](https://www.youtube.com/watch?v=oigfaZ5ApsM)
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
# Arrow Functions
2-
3-
Arrow Function is a new way of creating functions with the '=>' operator with a shorter syntax.
4-
5-
## Example
6-
7-
```js
8-
const sayHello = () => {
9-
console.log(`Hello from Arrow Function !`);
10-
}
11-
```
2+
3+
Arrow functions are a concise syntax for writing function expressions introduced in ES6. They use `=>` instead of the `function` keyword and do not have their own `this`, `arguments`, or `super` bindings. They are commonly used for callbacks and short expressions, but are not suitable as object methods or constructors.
124

135
Visit the following resources to learn more:
146

15-
- [@article@MDN - Arrow Function Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
7+
- [@article@MDN - Arrow Function Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)

src/data/roadmaps/javascript/content/assignment-operators@IvBtUzIGnkgGXrJjqmjf4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ An assignment operator assigns a value to its left operand based on the value of
55
Visit the following resources to learn more:
66

77
- [@article@Assignment Operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators)
8-
- [@article@Basic Operators](https://javascript.info/operators#assignment)
8+
- [@article@Basic Operators](https://javascript.info/operators#assignment)
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Async/Await
22

3-
`async/await` is a special syntax to work with promises in a more comfortable fashion.
4-
We use `async` keyword to declare a async function that return a Promise, and the `await` keyword makes a function wait for a Promise.
3+
`async/await` is a special syntax to work with promises in a more comfortable fashion. We use `async` keyword to declare a async function that return a Promise, and the `await` keyword makes a function wait for a Promise.
54

65
Visit the following resources to learn more:
76

87
- [@article@Async/await](https://javascript.info/async-await)
98
- [@article@async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
10-
- [@article@JavaScript Promises - Chaining](https://www.codeguage.com/courses/advanced-js/promises-chaining)
9+
- [@article@JavaScript Promises - Chaining](https://www.codeguage.com/courses/advanced-js/promises-chaining)

0 commit comments

Comments
 (0)