DEV Community

Discussion on: Multiply a string? 🤔

adam_cyclones profile image
Adam Crockett Author

So before I start:

result = Array.from({ length: 2 }, (_v) => 'Hello world');

The callback is actually slower then map new Array(n). Completely irrelevant off topic stuff right here 😂

I take the point 💯 functional is clear and my thoughts ... Are usually a jumbled mess, non the less apparently Python can multiply a string so it must be a good idea, right? 🤷‍♂️