Last active
September 15, 2019 18:31
-
-
Save paigen11/02876cd425d1d32f2d2c89474a535803 to your computer and use it in GitHub Desktop.
Another raw string example, but with expression interpolation in the template literal too
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
var str = String.raw`What's up \n${4+7}?`; | |
console.log(str); | |
// prints: What's up \n11? | |
console.log(str.length); | |
// prints: 15 | |
console.log(str.split('').join(',')); | |
// prints: W,h,a,t,',s, ,u,p, ,\,n,1,1,? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment