StylePropertyMapReadOnly: values() method
CSS Typed Object Model API
CSS Typed Object Model API
The **`StylePropertyMapReadOnly.values()`** method returns a new _array iterator_ containing the values for each index in the `StylePropertyMapReadOnly` object.
## Syntax
```js-nolint
values()
```
### Parameters
None.
### Return value
A new Array.
## Examples
### Basic usage
In this example, we use the `values()` method to access the values within the [`Element.computedStyleMap()`](/docs/Web/API/Element/computedStyleMap).
```js
// get a button element
const buttonEl = document.querySelector("button");
// we can retrieve all computed styles with `computedStyleMap`
const allComputedStyles = buttonEl.computedStyleMap();
// values returns an iterable list of the CSS values
const vals = allComputedStyles.values();
console.log(vals.next().value); // returns a CSSStyleValue
```
## Specifications
## Browser compatibility
Cite this
"StylePropertyMapReadOnly: values() method". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/StylePropertyMapReadOnly/values JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy