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

# JSValueMakeBoolean(_:_:)

Creates a JavaScript Boolean value.

```
func JSValueMakeBoolean(_ ctx: JSContextRef!, _ boolean: Bool) -> JSValueRef!
```

## Parameters

`ctx`

The execution context to use.

`boolean`

The Boolean value to assign to the newly created [`JSValueRef`](/documentation/JavaScriptCore/JSValueRef).

## Return Value

A [`JSValueRef`](/documentation/JavaScriptCore/JSValueRef) of the Boolean type that represents the value of `boolean`.

## 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)