CSSNumericArray: values() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("CSS Typed Object Model API")}} {{AvailableInWorkers}}
The **values()** method of the {{domxref("CSSNumericArray")}} interface returns a new _array iterator_ that yields each item in the object.
Syntax
js-nolint
values()Parameters
None.
Return value
A new iterable iterator object.
Examples
Iterating over values
js
const sum = new CSSMathSum(CSS.px(10), CSS.em(5), CSS.percent(50));
for (const value of sum.values.values()) {
console.log(value.toString());
}
// "10px"
// "5em"
// "50%"Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("CSSNumericArray.entries()")}}
- {{domxref("CSSNumericArray.forEach()")}}
- {{domxref("CSSNumericArray.keys()")}}
- {{domxref("CSSNumericArray.length")}}
- Using the CSS Typed OM
- CSS Typed Object Model API