CSSUnparsedValue: entries() method
CSS Typed Object Model API
CSS Typed Object Model API
The **`entries()`** method of the CSSUnparsedValue interface returns a new _array iterator_ that yields `[index, value]` pairs for each item in the object.
## Syntax
```js-nolint
entries()
```
### Parameters
None.
### Return value
A new [iterable iterator object](/docs/Web/JavaScript/Reference/Global_Objects/Iterator).
## Examples
### Iterating over index/value pairs
```js
const value = new CSSUnparsedValue(["1em", "#445566", "-45px"]);
for (const [index, fragment] of value.entries()) {
console.log(index, fragment);
}
// 0 "1em"
// 1 "#445566"
// 2 "-45px"
```
## Specifications
## Browser compatibility
## See also
- CSSUnparsedValue()
- CSSUnparsedValue.forEach()
- CSSUnparsedValue.keys()
- CSSUnparsedValue.length
- CSSUnparsedValue.values()
- [Using the CSS Typed OM](/docs/Web/API/CSS_Typed_OM_API/Guide)
- [CSS Typed Object Model API](/docs/Web/API/CSS_Typed_OM_API)
Cite this
"CSSUnparsedValue: entries() method". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/CSSUnparsedValue/entries JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy