Created
April 12, 2017 06:16
-
-
Save edutrul/647782f9b7a2e02c0643ccc66b88275f to your computer and use it in GitHub Desktop.
template_string.js
This file contains hidden or 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
let topic = { | |
'title': 'my title', | |
'author': 'edu', | |
'body': 'omg' | |
}; | |
let title = `<h2> ${topic.title} </h2>`; | |
let author = `<small> ${topic.author} </small>`; | |
let body = `<p> ${topic.body}</p>`; | |
let message = { title, author, body }; | |
console.log(message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment