Last active
November 7, 2017 13:05
-
-
Save desinas/9f210b886dac0a5c3db19e1d9ae04d39 to your computer and use it in GitHub Desktop.
Flatiron School Learn code snippets to remember!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)}!`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These are independent code lines, showing how to concatenate a var in a string, turn a string to uppercase and interpolation of a string.