Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>JS Bin</title>
- </head>
- <body>
- <table>
- <thead>
- <tr>
- <th>Date</th>
- <th>Subject</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- <script id="jsbin-javascript">
- // Write a named function that takes the following object and converts it to a string
- var obj = {
- subject: "What if sorrows swim?",
- date: "11/11/11",
- from: "Me@mail.com",
- to: "You@mail.com"
- };
- console.log(generateTableRow(obj));
- // "<tr><td class="date">11/11/11</td><td>What if sorrows swim?</td><td><span class="archive"></span><span class="delete"></td></tr>"
- // THEN, add the string to the table body in the html. You should visually see the data in the Output tab.
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">// Write a named function that takes the following object and converts it to a string
- var obj = {
- subject: "What if sorrows swim?",
- date: "11/11/11",
- from: "Me@mail.com",
- to: "You@mail.com"
- };
- console.log(generateTableRow(obj));
- // "<tr><td class="date">11/11/11</td><td>What if sorrows swim?</td><td><span class="archive"></span><span class="delete"></td></tr>"
- // THEN, add the string to the table body in the html. You should visually see the data in the Output tab.</script></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement