JSFiddle - React, Tailwind, and code Playground
by WK_of_Angmar
HTML
<div id="result"></div>
JavaScript
var total = 0, solutions = 0;
for (var i = 1; i <= 6; i++) {
for (var j = 1; j <= 6; j++) {
total++;
if (i + j === 10) { solutions++; }
}
}
result.textContent = "solutions: " + solutions + " total: " + total;