2019-02-04 21:58:46 +01:00

6 lines
74 B
JavaScript

function *myGenerator(n) {
return n
|> (yield #)
|> Math.abs;
}