BigInt.asIntN()

Draft
This page is not complete.

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The BigInt.asIntN static method is used to wrap a BigInt between -2width-1 and 2width-1-1.

Syntax

var result = BigInt.asIntN(width, bigint);

Parameters

width
The amount of bits available for the integer size.
bigint
The integer to clamp to fit into the supplied bits.

Returns

The value of bigint modulo 2width as a signed integer.

Examples

TBD

Specifications

Specification Status Comment
BigInt proposal Stage 3 Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "javascript.builtins.BigInt.asIntN" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Contributors to this page: ExE-Boss
Last updated by: ExE-Boss,