This page is not complete.
BigInt.asIntN static method is used to wrap a BigInt between -2width-1 and 2width-1-1.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
var result = BigInt.asIntN(width, bigint);
- The amount of bits available for the integer size.
- The integer to clamp to fit into the supplied bits.
The value of
bigint modulo 2
width as a signed integer.
|BigInt proposal||Stage 3||Initial definition.|