diff --git a/en/application-dev/reference/apis/js-apis-hashmap.md b/en/application-dev/reference/apis/js-apis-hashmap.md index c880644673fd9a8cd9d15ac05ec01afc9785bf3e..7ddc19b60d30d689005894cfcd14ee5df73daf90 100644 --- a/en/application-dev/reference/apis/js-apis-hashmap.md +++ b/en/application-dev/reference/apis/js-apis-hashmap.md @@ -338,7 +338,7 @@ hashMap.clear(); keys(): IterableIterator<K> -Obtains an iterator that contains all the elements in this container. +Obtains an iterator that contains all the keys in this container. **System capability**: SystemCapability.Utils.Lang diff --git a/en/application-dev/reference/apis/js-apis-treemap.md b/en/application-dev/reference/apis/js-apis-treemap.md index f05edc6533e92d21c49cf1dd2c91b7e9aa12ff0a..536b11e5a8f73cd646faf569feff32c76dc2083f 100644 --- a/en/application-dev/reference/apis/js-apis-treemap.md +++ b/en/application-dev/reference/apis/js-apis-treemap.md @@ -4,7 +4,7 @@ **TreeMap** is implemented using a red-black tree, which is a binary search tree where keys are stored in sorted order for efficient insertion and removal. -**[HashMap](js-apis-treemap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order. +**[HashMap](js-apis-hashmap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order. Recommended use case: Use **TreeMap** when you need to store KV pairs in sorted order. diff --git a/en/application-dev/reference/apis/js-apis-worker.md b/en/application-dev/reference/apis/js-apis-worker.md index 6d1bff42d490701f87940606d1ae4332b339b260..f964d85fe52d41a5daaf1cf130a5131a8273619f 100644 --- a/en/application-dev/reference/apis/js-apis-worker.md +++ b/en/application-dev/reference/apis/js-apis-worker.md @@ -89,7 +89,7 @@ const workerFAModel02 = new worker.ThreadWorker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory in the entry module. const workerStageModel01 = new worker.ThreadWorker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); -// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module. +// In the stage model, the workers directory is a child directory of the pages directory in the entry module. const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/worker.ts'); // For the script URL "entry/ets/workers/worker.ts" in the stage model: @@ -101,7 +101,7 @@ const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/work // workerdir indicates the directory where the worker file is located, and workerfile indicates the worker file name. // In the stage model, the workers directory is at the same level as the pages directory in the entry module, and bundlename is com.example.workerdemo. const workerStageModel03 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/workers/worker'); -// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module, and bundlename is com.example.workerdemo. +// In the stage model, the workers directory is a child directory of the pages directory in the entry module, and bundlename is com.example.workerdemo. const workerStageModel04 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/pages/workers/worker'); ``` @@ -1199,7 +1199,7 @@ const workerFAModel02 = new worker.Worker("../workers/worker.ts"); // In the stage model, the workers directory is at the same level as the pages directory. const workerStageModel01 = new worker.Worker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"}); -// In the stage model, the workers directory is at the same level as the child directory of the pages directory. +// In the stage model, the workers directory is a child directory of the pages directory. const workerStageModel02 = new worker.Worker('entry/ets/pages/workers/worker.ts'); // For the script URL "entry/ets/workers/worker.ts" in the stage model: @@ -2224,4 +2224,5 @@ Configuration of the **build-profile.json5** file: } } ``` - + + \ No newline at end of file