Created
February 7, 2016 17:28
-
-
Save lonekorean/4552e384f3aba09a59bd to your computer and use it in GitHub Desktop.
String replace, escaped
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 str = '1 + 1 + 1 = 3'; | |
str.replace(/\+/g, 'plus'); | |
// "1 plus 1 plus 1 = 3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment