Home > Enterprise >  How to remove the character "\" from string on typescript (angular)
How to remove the character "\" from string on typescript (angular)

Time:09-30

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,'')
  • Related