Skip to content

Instantly share code, notes, and snippets.

@desinas
Last active November 7, 2017 13:05
Show Gist options
  • Save desinas/9f210b886dac0a5c3db19e1d9ae04d39 to your computer and use it in GitHub Desktop.
Save desinas/9f210b886dac0a5c3db19e1d9ae04d39 to your computer and use it in GitHub Desktop.
Flatiron School Learn code snippets to remember!
// How to manipulate string in JS
const currentUser = 'Grace Hopper';
const welcomeMessage = `Welcome to Flatbook, ${currentUser}!`;
const excitedWelcomeMessage = welcomeMessage.toUpperCase();
const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`;
@desinas
Copy link
Author

desinas commented Nov 7, 2017

These are independent code lines, showing how to concatenate a var in a string, turn a string to uppercase and interpolation of a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment