J. S. Choi 35e4e1f067 Hack-pipe proposal with % topic token (#13416)
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-08-03 23:30:16 +02:00

10 lines
198 B
JavaScript

const result = 5
|> Math.pow(%, 2)
|> [1, 2, 3].map(n => n + %
|> % * 2
|> `${%} apples`
|> %.toUpperCase())
|> %.join();
expect(result).toEqual('52 APPLES,54 APPLES,56 APPLES');