---
title: toUInt64()
framework: javascriptcore
role: symbol
role_heading: Instance Method
path: javascriptcore/jsvalue/touint64()
---

# toUInt64()

## Declaration

```swift
func toUInt64() -> UInt64
```

## Discussion

Discussion Convert a JSValue to a uint64_t. The JSValue is converted to an integer according to the rules specified by the JavaScript language. If the value is a BigInt, then the value is truncated to a uint64_t.
