CSSNumericArray: length property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("CSS Typed Object Model API")}} {{AvailableInWorkers}}

The **length** read-only property of the {{domxref("CSSNumericArray")}} interface returns the number of items in the object.

Value

An integer.

Examples

Basic usage

In this example, we read the length of the {{domxref("CSSNumericArray")}} returned by the values property of a {{domxref("CSSMathSum")}}:

js
const sum = new CSSMathSum(CSS.px(10), CSS.em(5), CSS.percent(50));

console.log(sum.values.length); // 3

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also