<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSObjectGetArrayBufferByteLength(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:@F@JSObjectGetArrayBufferByteLength"
  },
  "title" : "JSObjectGetArrayBufferByteLength(_:_:_:)"
}
-->

# JSObjectGetArrayBufferByteLength(_:_:_:)

Returns the number of bytes in a JavaScript data object.

```
func JSObjectGetArrayBufferByteLength(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> Int
```

## Parameters

`ctx`

The execution context to use.

`object`

The JavaScript array buffer object with the length in bytes to return.

`exception`

A pointer to a [`JSValueRef`](/documentation/JavaScriptCore/JSValueRef) to store an exception in, if any. Pass `NULL` to discard any exception.

## Return Value

The number of bytes in the data object.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)