Answers for "surround substring with quotes"

0

surround substring with quotes

str = "toQuotenotToQuote"

quotedStr = str.replace(/(toQuote)/g, '"$1"')

console.log(quotedStr) // "toQuote"notToQuote
Posted by: Guest on July-14-2021

Code answers related to "surround substring with quotes"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language