I have a string that is "\YES\"
How to simply remove the \ from the string?
sessionStorage.getItem('questionList2')!.replace(/"\"/g,'')
But all it resulted is an error.
CodePudding user response:
sessionStorage.getItem('questionList2')!.replace(/\\/g,'')