JSFiddle - React, Tailwind, and code Playground
HTML
<table id="results">
<thead>
<th>rating</th>
<th>ups</th>
<th>downs</th>
<th>created</th>
<th>title</th>
</thead>
<tbody id="rows">
</tbody>
</table>
CSS
#results { border-collapse:separate; }
#results td { padding: 5px; }
JavaScript
$(function() {
$.getJSON("http://www.reddit.com/r/all.json?jsonp=?", function(results) {
results.data.children.forEach(function(story) {
var data = story.data;
var score = data.ups - data.downs;
var order = Math.log(Math.max(Math.abs(score), 1)) / Math.log(10);
var sign = score > 1 ? 1 : (score < 1 ? -1 : 0);
var seconds = data.created - 1134028003;
var rating = Math.round((order + sign * seconds / 45000) * 10000000) / 10000000;
data.rating = rating;
console.log(data, rating);
$("<tr>" +
"<td>" + data.rating + "</td>" +
"<td>" + data.ups + "</td>" +
"<td>" + data.downs + "</td>" +
"<td>" + data.created + "</td>" +
"<td><a href=\"" + data.url + "\">" + data.title + "</a></td>" +
"</tr>").appendTo("#results tbody");
});
});
});