colorCode = {
myTable;
const table = document.querySelector(".observablehq:nth-child(2)");
const allTableCells = table.querySelectorAll("td");
for(var i = 0, max = allTableCells.length; i < max; i++) {
var node = allTableCells[i];
var currentText = node.childNodes[0] && node.childNodes[0].nodeValue;
switch (currentText) {
case "Yes" : node.style.backgroundColor = "skyblue"; break;
case "Checking", "Maybe" : node.style.backgroundColor = "lightyellow"; break;
case "Pending" : node.style.backgroundColor = "lightgrey"; break;
case "Want" : node.style.backgroundColor = "lightgrey"; break;
case "No" : node.style.backgroundColor = "#ff9f98"; break;
}
}
return md`<span style="color: grey">Table color coded on ${new Date(Date.now()).toUTCString()}</span>`
}