Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js replace space with underscore

var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
 
PREVIOUS NEXT
Tagged: #js #replace #space #underscore
ADD COMMENT
Topic
Name
4+8 =