Hi,
let us say i have string “12327567889” where 27 should be replaced by one space.
how to do that?
Hi,
let us say i have string “12327567889” where 27 should be replaced by one space.
how to do that?
One way to do it.
// split on the 27 and join back together with a space.
"12327567889".split('27').join(' ')
Another way
let newStr = "12327567889".replace("27", " ");
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.