Quantcast
Viewing all articles
Browse latest Browse all 1787

Basic misunderstanding? (Playground issue?)

I am doing this and expecting “6” to be logged to the console, but I get {} instead (in the Playground).

It is so simple and obvious that I am completely stumped as to what I’m missing, but something extremely basic, obviously.

let out = Belt.Array.reduce([1, 2, 3], 0, (sum, num) => sum + num)

Console.log(Belt.Int.toString(out))

Edit: this is working fine in my code, so evidently something I’m not understanding about the Playground.


Viewing all articles
Browse latest Browse all 1787

Trending Articles