HTML
JS
function assert(pass, msg){
var type = pass ? "VRAI" : "FAUX";
var newLI = document.createElement("li");
var ulTag = document.querySelector("#results");
newLI.innerHTML="<li class='" + type + "'>
<b>" + type + "</b> " + msg +
"</li>";
ulTag.appendChild(newLI);
}
CSS
.VRAI{
color: green;
}
.FAUX{
color: red;
}