---
title: "compare(_:)"
framework: javascriptcore
role: symbol
role_heading: Instance Method
path: "javascriptcore/jsvalue/compare(_:)-64n3k"
---

# compare(_:)

## Declaration

```swift
func compare(_ other: UInt64) -> JSRelationCondition
```

## Return Value

Return Value A value of JSRelationCondition, a kJSRelationConditionUndefined is returned if an exception is thrown.

## Discussion

Discussion Compare a JSValue with a uint64_t. The JSValue is converted to an integer according to the rules specified by the JavaScript language then compared with other.
