<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSValue/call(withArguments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:objc(cs)JSValue(im)callWithArguments:"
  },
  "title" : "call(withArguments:)"
}
-->

# call(withArguments:)

Invokes the value as a JavaScript function.

```
func call(withArguments arguments: [Any]!) -> JSValue!
```

## Parameters

`arguments`

The parameters to pass to the function. The objects in this array must be other [`JSValue`](/documentation/JavaScriptCore/JSValue) objects or objects that can be converted to JavaScript values using the methods listed in the Creating JavaScript Values section in [`JSValue`](/documentation/JavaScriptCore/JSValue).

## Return Value

The result of calling the value as a function, or `nil` if the value cannot be treated as a JavaScript function.

## Discussion

In JavaScript, if a function does not explicitly return a value, it implicitly returns the value `undefined`—use the [`isUndefined`](/documentation/JavaScriptCore/JSValue/isUndefined) property to test for this result.

---

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)