Thanks for the input — I thought that even if the constant doesn’t matter, O(xn) == O(n) in a theory level, the 2n still makes sense in most people’s heads, even if we shouldn’t optimize for it.

What I’m saying is that even if optimizing for constant time multiplier is not really a thing, it still can be used as a teaching point — this article, as I intended it, isn’t “Rust > JS” it’s “Learn Rust iterator through scope of JS”.

When I get to my computer, I’ll make sure to emphasize that in the article :) thanks for the help and thanks for reading!

Developer passionate about learning and creating things. Writing to help others learn.