How to replace or remove all spaces from a string in JavaScript?

How to replace or remove all spaces from a string in JavaScript?

More to explore

Based on this image's title: “How to replace or remove all spaces from a string in JavaScript?