Created
February 24, 2019 07:13
-
-
Save priesdelly/4ea89bd02fdd28f60d847f06346a6fbd to your computer and use it in GitHub Desktop.
Replace string in javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var strText = 'Test Replace bear and duck and dog and cat'; | |
var strAfRep = strText.replace(/and/g,'or'); | |
console.log(strAfRep); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment