> For the complete documentation index, see [llms.txt](https://range.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://range.angular-package.dev/greater/methods/valueof.md).

# valueOf()

## `Greater.prototype.valueOf()`

Returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object).

{% code title="greater.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as any;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/greater/generic-type-variables.md#greater-less-than-value-greater-than)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/greater/generic-type-variables.md#greater-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Greater(id).valueOf();
```
