Skip to content

Instantly share code, notes, and snippets.

@potch
Last active August 29, 2015 14:06
Show Gist options
  • Save potch/52185d3479e8c9b79852 to your computer and use it in GitHub Desktop.
Save potch/52185d3479e8c9b79852 to your computer and use it in GitHub Desktop.
`
<h2>Messages (${ messages.length }):</h2>
<ul>
${ messages.map(((msg, i) => `
<li class="${ i % 2 ? 'odd' : 'even' }">
${ msg.subject }
${ msg.read ?
`this message is read`
:
`this message is unread`
}
</li>
`)).join('') }
</ul>
`
@potch
Copy link
Author

potch commented Sep 26, 2014

ES6 templating idea I've been kicking around my head. Not even close to elegant or production ready.

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