5.7.1 Java  Script
5.7.1.1 Types
5.7.1.2 loader.mjs
5.7.1.3 Accounts
5.7.1.4 Contracts
5.7.1.5 Network Utilities
5.7.1.6 Utilities
5.7.1.7 ask.mjs
5.7.1.1 Types

The table below shows the JavaScript representation of each of the Reach types:

// Reach  => JavaScript
Null      => null
Bool      => 'boolean'
UInt      => 'BigNumber' or 'number'
Bytes     => 'string'
Digest    => 'BigNumber'
Address   => NetworkAccount
Token     => Address on ETH; UInt on ALGO
Array     => array
Tuple     => array
Object    => object
Data      => ['variant', value]
Struct    => object

For example, the Reach type MInt = Data({None: Null, Some: UInt}) inhabitant MInt.Some(42) is represented as ['Some', 42] in JavaScript.