diff --git a/en/application-dev/reference/apis/js-apis-deque.md b/en/application-dev/reference/apis/js-apis-deque.md index 1d94bd6b83d3707b566165ebfd1d0e2cb6f78afe..a8931d24e49bee0459923e96b9d4cea7fce31777 100644 --- a/en/application-dev/reference/apis/js-apis-deque.md +++ b/en/application-dev/reference/apis/js-apis-deque.md @@ -154,7 +154,6 @@ deque.insertEnd(4); deque.insertFront(5); deque.insertFront(2); deque.insertFront(4); -deque.popLast(); let result = deque.popLast(); ``` diff --git a/en/application-dev/reference/apis/js-apis-hashmap.md b/en/application-dev/reference/apis/js-apis-hashmap.md index d7399e1b9f6f01bca0a825bb91e594235f5205a0..0e5074650a58f11ca81e4a50580a02df48ab0fe1 100644 --- a/en/application-dev/reference/apis/js-apis-hashmap.md +++ b/en/application-dev/reference/apis/js-apis-hashmap.md @@ -319,7 +319,7 @@ let result = hashMap.replace("sdfs", 357); ### forEach -forEach(callbackfn: (value: V, key?: K, map?: HashMap) => void, thisArg?: Object): void +forEach(callbackfn: (value?: V, key?: K, map?: HashMap) => void, thisArg?: Object): void Uses a callback to traverse the entries in this container and obtain their position indexes. diff --git a/en/application-dev/reference/apis/js-apis-hashset.md b/en/application-dev/reference/apis/js-apis-hashset.md index 7ba96f84539cccb36815d4b147853b9aacc269dc..0a85c59cf83ccb22240ef7258394651a852db2d8 100644 --- a/en/application-dev/reference/apis/js-apis-hashset.md +++ b/en/application-dev/reference/apis/js-apis-hashset.md @@ -184,7 +184,7 @@ while(temp != undefined) { ### forEach -forEach(callbackfn: (value: T, key?: T, set?: HashSet<T>) => void, thisArg?: Object): void +forEach(callbackfn: (value?: T, key?: T, set?: HashSet<T>) => void, thisArg?: Object): void Uses a callback to traverse the entries in this container and obtain their position indexes. diff --git a/en/application-dev/reference/apis/js-apis-lightweightmap.md b/en/application-dev/reference/apis/js-apis-lightweightmap.md index 255a919b0ad43a844191147a90c676b255d7f59b..b61e3e25c5c41e94056904e074669ad68428c117 100644 --- a/en/application-dev/reference/apis/js-apis-lightweightmap.md +++ b/en/application-dev/reference/apis/js-apis-lightweightmap.md @@ -510,7 +510,7 @@ while(temp != undefined) { ### forEach -forEach(callbackfn: (value: V, key?: K, map?: LightWeightMap) => void, thisArg?: Object): void +forEach(callbackfn: (value?: V, key?: K, map?: LightWeightMap) => void, thisArg?: Object): void Uses a callback to traverse the entries in this container and obtain their position indexes. @@ -569,7 +569,7 @@ while(temp != undefined) { ### toString -toString(): string +toString(): String Concatenates the entries in this container into a string and returns the string. @@ -577,7 +577,7 @@ Concatenates the entries in this container into a string and returns the string. | Type| Description| | -------- | -------- | - | string | Returns a string.| + | String | Returns a string.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-lightweightset.md b/en/application-dev/reference/apis/js-apis-lightweightset.md index cf32ebe8d594116443ca52474d2721674214388a..8d604ed7accd8a3781a626bfb13bd4b26342c599 100644 --- a/en/application-dev/reference/apis/js-apis-lightweightset.md +++ b/en/application-dev/reference/apis/js-apis-lightweightset.md @@ -160,7 +160,7 @@ Checks whether this container has the specified key. let lightWeightSet = new LightWeightSet(); let result = lightWeightSet.has(123); lightWeightSet.add(123); -let result = lightWeightSet.has(123); +result = lightWeightSet.has(123); ``` @@ -188,7 +188,7 @@ Checks whether this container contains objects of the same type as the specified let lightWeightSet = new LightWeightSet(); lightWeightSet.add("Ahfbrgrbgnutfodgorrogorgrogofdfdf"); lightWeightSet.add("sdfs"); -let obj = {"Ahfbrgrbgnutfodgorrogorgrogofdfdf", "sdfs"}; +let obj = ["Ahfbrgrbgnutfodgorrogorgrogofdfdf", "sdfs"]; let result = lightWeightSet.equal(obj); ``` @@ -223,7 +223,7 @@ Obtains the position index of the entry with the specified key in this container | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| key | T | Yes| Key of the entry to query.| +| key| T | Yes| Key of the entry to query.| **Return value** @@ -251,7 +251,7 @@ Removes an entry of the specified key from this container. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| key | T | Yes| Key of the entry to remove.| +| key| T | Yes| Key of the entry to remove.| **Return value** @@ -414,7 +414,7 @@ while(index < lightWeightSet.length) { ### forEach -forEach(callbackfn: (value: T, key?: T, set?: LightWeightSet<T>) => void, thisArg?: Object): void +forEach(callbackfn: (value?: T, key?: T, set?: LightWeightSet<T>) => void, thisArg?: Object): void Uses a callback to traverse the entries in this container and obtain their position indexes. @@ -429,7 +429,7 @@ callbackfn | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | value | T | Yes| Value of the entry that is currently traversed.| -| key | T | No| Key of the entry that is currently traversed (same as **value**).| +| key| T | No| Key of the entry that is currently traversed (same as **value**).| | set | LightWeightSet<T> | No| Instance that invokes the **forEach** method.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-linkedlist.md b/en/application-dev/reference/apis/js-apis-linkedlist.md index 35a68b7ef9f6ce411aa9c75a13b4df65a5de4ddd..c90867ac6d3308532060b0f4ce34b58cac5cc7bf 100644 --- a/en/application-dev/reference/apis/js-apis-linkedlist.md +++ b/en/application-dev/reference/apis/js-apis-linkedlist.md @@ -27,16 +27,10 @@ SystemCapability.Utils.Lang ### constructor -constructor(head?: NodeObj<T>, tail?: NodeObj<T>) +constructor() A constructor used to create a **LinkedList** instance. -**Parameters** - -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| head | NodeObj<T> | Yes| No| Node object, including **element**, **next**, and **prev**.| -| tail | NodeObj<T> | Yes| No| Node object, including **element**, **next**, and **prev**.| **Example** @@ -300,7 +294,7 @@ let result = linkedList.removeFirst(); ### removeLast -removeLst(): T +removeLast(): T Removes the last entry from this container. diff --git a/en/application-dev/reference/apis/js-apis-list.md b/en/application-dev/reference/apis/js-apis-list.md index fc7e38d2a1ae33b561f3902ea3906b5b1cadab16..7c39d49ce7febeb2c27fcd532f993ea4ec2e5d37 100644 --- a/en/application-dev/reference/apis/js-apis-list.md +++ b/en/application-dev/reference/apis/js-apis-list.md @@ -27,15 +27,10 @@ SystemCapability.Utils.Lang ### constructor -constructor(head?: NodeObj<T>) +constructor() A constructor used to create a **List** instance. -**Parameters** - -| Name| Value Type | Readable| Description| -| -------- | -------- | -------- | -------- | -| head | NodeObj<T> | Yes| Node object, including **element** and **next**.| **Example** @@ -106,7 +101,7 @@ Checks whether this container has the specified entry. | Name| Value Type | Mandatory| Description| | -------- | -------- | -------- | -------- | -| element | T | Yes| Entry to query.| +| element | T | Yes| Entry to check.| **Return value** @@ -465,6 +460,7 @@ list.clear(); ### set set(index: number, element: T): T + Replaces an entry at the specified position in this container with a given entry. **Parameters** diff --git a/en/application-dev/reference/apis/js-apis-plainarray.md b/en/application-dev/reference/apis/js-apis-plainarray.md index 80b633d92c2e0db156c98ea5a5b577fd1078ebdb..5e847795d004d2fabb0acdf3fc28d7231b0cc9a2 100644 --- a/en/application-dev/reference/apis/js-apis-plainarray.md +++ b/en/application-dev/reference/apis/js-apis-plainarray.md @@ -416,7 +416,7 @@ plainArray.clear(); ### forEach -forEach(callbackfn: (value: T, key?: number, PlainArray?: PlainArray) => void, thisArg?: Object): void +forEach(callbackfn: (value?: T, index?: number, PlainArray?: PlainArray) => void, thisArg?: Object): void Uses a callback to traverse the entries in this container and obtain their position indexes. @@ -431,8 +431,8 @@ callbackfn | Name| Type | Mandatory| Description| | -------- | -------- | -------- | -------- | | value | T | Yes| Value of the entry that is currently traversed.| -| key | number | Yes| Key of the entry that is currently traversed.| -| plainArray | PlainArray | No| Instance that invokes the **forEach** API.| +| index | number | Yes| Key of the entry that is currently traversed.| +| plainArray | PlainArray | No| Instance that invokes the **forEach** API.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-vector.md b/en/application-dev/reference/apis/js-apis-vector.md index b142bffef838bdbf1a836dd73e9d92dbe15bb100..ce4af8ba13f2876cc08c8f7ab3be528f44301f32 100644 --- a/en/application-dev/reference/apis/js-apis-vector.md +++ b/en/application-dev/reference/apis/js-apis-vector.md @@ -569,6 +569,7 @@ let result = vector.toSting(); ### copyToArray copyToArray(array: Array<T>): void + Copies entries in this container into an array to overwrite elements of the same position indexes. **Parameters**