Skip to content

Instantly share code, notes, and snippets.

@chris-sev
Last active November 27, 2018 01:06
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 chris-sev/efe7fe257c9bfdc4d81aa654ddbb5bec to your computer and use it in GitHub Desktop.
Save chris-sev/efe7fe257c9bfdc4d81aa654ddbb5bec to your computer and use it in GitHub Desktop.
Quick Example
// 1. create a message
const message = 'This is my message.';
// 2. replace message with new thing
// this creates a brand new string. does not change the original variable (message)
const newMessage = message.replace('message', 'new thing');
// 3. output: This is my new thing.
console.log(newMessage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment