Skip to content

Instantly share code, notes, and snippets.

@alexpaul
Last active October 14, 2021 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpaul/4ec66a6ed01e19e1006115a2e9d67650 to your computer and use it in GitHub Desktop.
Save alexpaul/4ec66a6ed01e19e1006115a2e9d67650 to your computer and use it in GitHub Desktop.
Removing backlash characters from a String in JavaScript.
const str = `{\"hitPaywall\":false,\"counted\":false}`

const newStr = str.replaceAll('\\', '')

console.log(newStr) // {"hitPaywall":false,"counted":false}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment