Guest User

Untitled

a guest
Jul 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. // Rendering markup with loops and string concatenation
  2. for (var i = 0; i < foo.name.length; i++) {
  3. content += '<li><a href="foo/' + foo.id[i] + '">' + foo.name[i] + '</a></li>';
  4. }
  5.  
  6. // Rendering with a JavaScript template
  7. content = '{{#foo}}' +
  8. '<li><a href="foo/${id}">${name}</a></li>' +
  9. '{{/foo}}';
Add Comment
Please, Sign In to add comment