Skip to content

Instantly share code, notes, and snippets.

@hoyangtsai
Created May 29, 2023 11:19
Show Gist options
  • Save hoyangtsai/439fe26cc20dd05c6f1936a150a06b03 to your computer and use it in GitHub Desktop.
Save hoyangtsai/439fe26cc20dd05c6f1936a150a06b03 to your computer and use it in GitHub Desktop.
replace a word in a sentence #snippet
'Brave New World'.split('New').join('Old')
// "Brave Old World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment