Hacker News new | ask | show | jobs
by perfunctory 5236 days ago
Would you mind posting a Coffeescript snippet to demonstrate that?
2 comments

  items = [ 1, 2, 3, 4 ]
  el 'div#message', [
    el 'a.biglink', href: 'http://www.google.com', [ 'A link to Google' ]
    el 'ul',
      el 'li.item', [ "#{item}. Item" ] for item in items
    'There are lots of items'.localise() + '. ' if items.length > 1
    'This is just plain text. <script>I have no effect</script>' ]