February 2019
Beginner to intermediate
180 pages
4h 4m
English
Reason arrays compile to regular JavaScript arrays. Reason arrays are as follows:
They look like this:
let array = [|"first", "second", "third"|];
Accessing and updating elements of an array are the same as in JavaScript:
array[0] = "updated";
In JavaScript, we map over the array, as follows:
/* JavaScript */array.map(e => e + "-mapped")
To do the same in Reason, we have a few different options.
Read now
Unlock full access