Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

replace characters form array

let str = 'Twas the night before Xmas...';
let newstr = str.replace(/xmas/i, 'Christmas');
console.log(newstr);  // Twas the night before Christmas...
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #replace #characters #form #array
ADD COMMENT
Topic
Name
5+1 =