- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Sep 2021 19:45:28 +0000
- To: public-css-archive@w3.org
Yeah, `.keys()` produces an iterator for the keys (numeric indexes in this case), `.values()` (the default for arrays) produces just the values, and `.entries()` produces `[index, value]` pairs.
You can then conveniently destructure over them:
```js
for(let [i, v] of palette.entries()) { ... }
```
--
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6593#issuecomment-917166316 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 September 2021 19:45:29 UTC