Skip to main content

Try it Live

Run Opcode examples in the interactive playground

Opcode.swapPosition()

Get stack position swapped by SWAP opcode (1-16).

Parameters

  • opcode: BrandedOpcode - Opcode to check

Returns

number | undefined - Position (1-16) or undefined if not SWAP

Stack Semantics