I don't know how to remove the commas when result is displayed on my website.
let regex = /\W/g;
let string = "How are you today?";
let string2 = "48%"
let result = string.match(regex);
let result2 = string2.match(regex);
document.getElementById("header").innerHTML = result;
document.getElementById("head").innerHTML = result2;
<p id="header"></p>
<p id="head"></p>
[' ', ' ', ' ', '?']so what are you expecting??? You expecting to see whitespace in the HTML? What were you thinking you were going to see? You are setting innerHTML to an array which will use toString()\w