Hacker News new | ask | show | jobs
by shrew 2093 days ago
It does, but it still creates an intermediate array which is what the parent comment was suggesting the use of `replace` worked around.

With that said, there could easily be an array being iterated under the hood with the `replace` method anyway.