Advertisement
Guest User

Untitled

a guest
Jun 21st, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JS Bin</title>
  6. </head>
  7. <body>
  8. <table>
  9. <thead>
  10. <tr>
  11. <th>Date</th>
  12. <th>Subject</th>
  13. <th>Actions</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17.  
  18. </tbody>
  19. </table>
  20. <script id="jsbin-javascript">
  21. // Write a named function that takes the following object and converts it to a string
  22.  
  23. var obj = {
  24. subject: "What if sorrows swim?",
  25. date: "11/11/11",
  26. from: "Me@mail.com",
  27. to: "You@mail.com"
  28. };
  29.  
  30. console.log(generateTableRow(obj));
  31.  
  32. // "<tr><td class="date">11/11/11</td><td>What if sorrows swim?</td><td><span class="archive"></span><span class="delete"></td></tr>"
  33.  
  34.  
  35.  
  36.  
  37. // THEN, add the string to the table body in the html. You should visually see the data in the Output tab.
  38. </script>
  39.  
  40.  
  41.  
  42. <script id="jsbin-source-javascript" type="text/javascript">// Write a named function that takes the following object and converts it to a string
  43.  
  44. var obj = {
  45. subject: "What if sorrows swim?",
  46. date: "11/11/11",
  47. from: "Me@mail.com",
  48. to: "You@mail.com"
  49. };
  50.  
  51. console.log(generateTableRow(obj));
  52.  
  53. // "<tr><td class="date">11/11/11</td><td>What if sorrows swim?</td><td><span class="archive"></span><span class="delete"></td></tr>"
  54.  
  55.  
  56.  
  57.  
  58. // THEN, add the string to the table body in the html. You should visually see the data in the Output tab.</script></body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement