diff --git a/files/en-us/web/api/filesystemdirectoryhandle/entries/index.md b/files/en-us/web/api/filesystemdirectoryhandle/entries/index.md index e818db4e7dd0629..2332e631f7cf593 100644 --- a/files/en-us/web/api/filesystemdirectoryhandle/entries/index.md +++ b/files/en-us/web/api/filesystemdirectoryhandle/entries/index.md @@ -9,10 +9,10 @@ browser-compat: api.FileSystemDirectoryHandle.entries {{securecontext_header}}{{APIRef("File System API")}} The **`entries()`** method of the -{{domxref("FileSystemDirectoryHandle")}} interface returns an array of a given object's -own enumerable property `[key, value]` pairs, in the same order as that -provided by a [`for...in`](/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loop (the difference being that a for-in loop -enumerates properties in the prototype chain as well). +{{domxref("FileSystemDirectoryHandle")}} interface returns a new asynchronous iterator +for the iteration of the key-value pairs of the entries within the `FileSystemDirectoryHandle` +on which this method is called. The key-value pairs are +in the form of an array like `[key, value]`. ## Syntax @@ -26,11 +26,12 @@ None. ### Return value -An array of the given `FileSystemDirectoryHandle` object's own enumerable -property `[key, value]` pairs. +A new asynchronous iterator containing the key-value pairs of each entry within the `FileSystemDirectoryHandle`. ## Examples +Use the `for await...of` loop can simplify the iteration process. + ```js const dirHandle = await window.showDirectoryPicker(); diff --git a/files/en-us/web/api/filesystemdirectoryhandle/keys/index.md b/files/en-us/web/api/filesystemdirectoryhandle/keys/index.md index 8cfc30ddadeb282..255b2829c612b22 100644 --- a/files/en-us/web/api/filesystemdirectoryhandle/keys/index.md +++ b/files/en-us/web/api/filesystemdirectoryhandle/keys/index.md @@ -9,8 +9,9 @@ browser-compat: api.FileSystemDirectoryHandle.keys {{securecontext_header}}{{APIRef("File System API")}} The **`keys()`** method of the -{{domxref("FileSystemDirectoryHandle")}} interface returns a new _array iterator_ -containing the keys for each item in `FileSystemDirectoryHandle`. +{{domxref("FileSystemDirectoryHandle")}} interface returns a new asynchronous iterator +for the iteration of the key of the entries within the `FileSystemDirectoryHandle` +on which this method is called. ## Syntax @@ -24,10 +25,12 @@ None. ### Return value -A new {{jsxref('Array')}} +A new asynchronous iterator containing the keys of each entry within the `FileSystemDirectoryHandle`. ## Examples +Use the `for await...of` loop can simplify the iteration process. + ```js const dirHandle = await window.showDirectoryPicker(); diff --git a/files/en-us/web/api/filesystemdirectoryhandle/values/index.md b/files/en-us/web/api/filesystemdirectoryhandle/values/index.md index b0fda1d577052b0..36e4267a3e830e2 100644 --- a/files/en-us/web/api/filesystemdirectoryhandle/values/index.md +++ b/files/en-us/web/api/filesystemdirectoryhandle/values/index.md @@ -9,9 +9,9 @@ browser-compat: api.FileSystemDirectoryHandle.values {{securecontext_header}}{{APIRef("File System API")}} The **`values()`** method of the -{{domxref("FileSystemDirectoryHandle")}} interface returns a new _array iterator_ -containing the values for each index in the `FileSystemDirectoryHandle` -object. +{{domxref("FileSystemDirectoryHandle")}} interface returns a new asynchronous iterator +for the iteration of the value of the entries within the `FileSystemDirectoryHandle` +on which this method is called. ## Syntax @@ -25,10 +25,12 @@ None. ### Return value -A new {{jsxref('Array')}} +A new asynchronous iterator containing the handles of each entry within the `FileSystemDirectoryHandle`. ## Examples +Use the `for await...of` loop can simplify the iteration process. + ```js const dirHandle = await window.showDirectoryPicker();