3 ms·
The Temporal API supports a `from` method/function on most of the options - that's very much the functional approach to avoid `new`. Often objects that are cla
by bern4444 5y ago
The Temporal API supports a `from` method/function on most of the options - that's very much the functional approach to avoid `new`.
Often objects that are class based will expose a `of` or `from` method that abstracts over the `new` keyword `Array.from()` is one example instead of `new Array()` (of course the most common way is `x = [1, 2, 3]` but these other options exist too).
This seems fairly functional to me.