Answers for "replace - with space"

0

replace - with space

let str = "This-is-a-news-item-";
str = str.replace(/-/g, ' ');
alert(str);
Posted by: Guest on June-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language