Which is more memory efficient in JavaScript: big arrays, or big strings with a comma separator?

I am working with big arrays, bug I want to know if I can compress it’s content to be more memory effectiant, I am using:


and was wondering if it woild be more efficient to just do


would be slightly more effecient.

Q: Are Strings more memory effecient than Arrays? => if not, is there any way to compress an Array to save memory?


Leave a Reply

Your email address will not be published.