mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): Reword adjacent code elements for improved Crowdin compatibility (#60090)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
parent
31369067da
commit
83a6854243
@ -84,7 +84,7 @@ request.onsuccess = function(event) {
|
||||
};
|
||||
```
|
||||
|
||||
This code retrieves the customer with `id` `1` from our `"customers"` object store.
|
||||
This code retrieves the customer with `id` of `1` from our `"customers"` object store.
|
||||
|
||||
One of the key features of `IndexedDB` is that it's asynchronous.
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Flex properties are properties that you can apply to flex containers to determin
|
||||
|
||||
Let's start with `flex-wrap`. This property determines how flex items are wrapped within a flex container to fit the available space. `flex-wrap` can take three possible values: `nowrap`, `wrap`, and `wrap-reverse`. `nowrap` is the default value—flex items won't be wrapped onto a new line, even if their width exceeds the container's width.
|
||||
|
||||
In the code below, we have three `div` elements. Let's focus on the `width`. The `main` container with the `red` `border` has a `width` of `200px`, while its three child `div` elements combined have a `width` of `240px` (`80px` each):
|
||||
In the code below, we have three `div` elements. Let's focus on the `width`. The `main` container bordered in red has a `width` of `200px`, while its three child `div` elements combined have a `width` of `240px` (`80px` each):
|
||||
|
||||
```css
|
||||
main {
|
||||
|
||||
@ -125,7 +125,7 @@ Here are the differences between a `Map` and a `WeakMap`:
|
||||
| --- | --- | --- |
|
||||
| **Key Type** | Keys can be of any data type, including strings, numbers, objects, or even functions. | Keys must be objects. |
|
||||
| **Use Case** | Use a `Map` when you need to associate data with any type of key. | Use a `WeakMap` when you only need to associate data with objects. |
|
||||
| **Iteration** | You can loop through a `Map` using `forEach()` `keys()`, `values()`, or `entries()`. | A `WeakMap` is not iterable. |
|
||||
| **Iteration** | You can loop through a `Map` using `forEach()`, `keys()`, `values()`, or `entries()`. | A `WeakMap` is not iterable. |
|
||||
| **Size Property** | `Map` has a `size` property to get the number of key-value pairs. | `WeakMap` does not have a `size` property. |
|
||||
|
||||
In the table above, you can see the differences summarized including the key type, use case, iteration and size property. Please take a moment to read the content of this table to learn more about their differences.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user