Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to replace all characters in a string javascript

const string = "a, b, c, d, e, f";
string.replace(/,/g, '');
console.log(string) //a b c d e f 
Comment

js replace all char in string

"x".replaceAll("x", "xyz");
// xyz

"x".replaceAll("", "xyz");
// xyzxxyz

"aA".replaceAll("a", "b", true);
// bb

"Hello???".replaceAll("?", "!");
// Hello!!!
Comment

replace all character in string javascript

let a = "How to search and replace a char in a string";
while (a.search(" ", ""))
{
   a = a.replace(" ", "");
}
console.log(a);
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery reset form 
Javascript :: border react native 
Javascript :: write file with deno 
Javascript :: how to get the value of radio button in jquery 
Javascript :: enter event in jquery 
Javascript :: javascript promise sleep 
Javascript :: datatable remove show 
Javascript :: react scroll to bottom of div 
Javascript :: view engine setup express 
Javascript :: javascript onclick href location 
Javascript :: how to reset form after submit using jquery and ajax 
Javascript :: remove string from array in js 
Javascript :: clear table in jquery 
Javascript :: generate random ip address javascript 
Javascript :: Get random name from an array in javascript 
Javascript :: skip mongoose 
Javascript :: set up node js server express 
Javascript :: find last prisma 
Javascript :: error java.io.filenotfoundexception tessdata/eng.traineddata 
Javascript :: mui image 
Javascript :: expressjs create encrypted password 
Javascript :: randomly genaret color in js 
Javascript :: see if discord message is in dm discord.js 
Javascript :: logic for building calculator using JavaScript without using eval 
Javascript :: remove duplicate strings from array javascript 
Javascript :: get array of all property in object array 
Javascript :: js strip_tags 
Javascript :: javascript moeda reais 
Javascript :: get value of input react 
Javascript :: randome words api 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =