Created
May 19, 2015 15:56
-
-
Save deitrick/bac5e939029c4c860fe1 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/lapimi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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: "[email protected]", | |
to: "[email protected]" | |
}; | |
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: "[email protected]", | |
to: "[email protected]" | |
}; | |
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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: "[email protected]", | |
to: "[email protected]" | |
}; | |
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment