<!--
{
  "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/JSValueMakeNumber(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:@F@JSValueMakeNumber"
  },
  "title" : "JSValueMakeNumber(_:_:)"
}
-->

# JSValueMakeNumber(_:_:)

Creates a JavaScript value of the number type.

```
func JSValueMakeNumber(_ ctx: JSContextRef!, _ number: Double) -> JSValueRef!
```

## Parameters

`ctx`

The execution context to use.

`number`

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

## Return Value

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

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