Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

replace is not working in javascript

'123123'.replace('2', '4'); // 124123 <-- replace only first symbol '2'
'123123'.replaceAll('2', '4'); // 124124 <-- replace all symbols '2'
Comment

PREVIOUS NEXT
Code Example
Javascript :: regular expression in elastic 
Javascript :: how to serve css files express 
Javascript :: how to set a timeout on an array element 
Javascript :: split first character of string in javascript 
Javascript :: checkbox event listeners 
Javascript :: latitude longitude to km javascript 
Javascript :: coffeescript to javascript 
Javascript :: right shift operator js 
Javascript :: js while continue 
Javascript :: typeof javascript 
Javascript :: encryptedfields mongoose-encrypt 
Javascript :: move item to end of array for of 
Javascript :: upload file axios 
Javascript :: navlink 
Javascript :: javascript find object in array by property value 
Javascript :: how to get first element of an array in javascript 
Javascript :: configuration react-router-dom v6 
Javascript :: reduce object to array javascript 
Javascript :: Cannot use import statement inside the Node.js REPL, alternatively use dynamic import 
Javascript :: hello world in javascript 
Javascript :: $.post javascript 
Javascript :: export e import javascript 
Javascript :: javascript find object in array and replace it 
Javascript :: jquery select input 
Javascript :: silent keylogger browser 
Javascript :: how to disable strict mode on object in javascript 
Javascript :: array as json 
Javascript :: Factorialize a Number 
Javascript :: what are json files for 
Javascript :: fontawesome icon size 1.5 angular 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =