Skip to content

Instantly share code, notes, and snippets.

@paigen11
Last active September 15, 2019 18:31
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 paigen11/02876cd425d1d32f2d2c89474a535803 to your computer and use it in GitHub Desktop.
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
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