I want to clear all the whitespaces in the string arrayIsNowJoined, and everywhere I look up target the solution I have...but it just doesn't work. I got the following code:
const array1 = ["1, 3, 4, 7, 16", "1, 2, 4, 16"];
let arrayIsNowJoined = array1.join();
arrayIsNowJoined.replace(/\s/g, "");
console.log(arrayIsNowJoined);
What I'm doing wrong?