Skip to content

Commit

Permalink
fixed formula. again...
Browse files Browse the repository at this point in the history
  • Loading branch information
RickGelhausen committed Oct 19, 2023
1 parent 75ac2f6 commit 2f33d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/recursions.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function checkLinearRecursion() {

for (let i = 0; i < lrtable.rows[1].cells.length; i++) {
const cellElement = lrtable.rows[1].cells[i];
const current = parseFloat(cellElement.childNodes[0].value);
const current = cellElement.childNodes[0].value;
const ei = expected[i];

if (i >= x) {
Expand All @@ -86,7 +86,7 @@ function checkLinearRecursion() {
} else {
if (current === "" || current === null) {
cellElement.style.backgroundColor = "var(--wrong-answer)";
} else if (current === ei) {
} else if (parseFloat(current) === ei) {
cellElement.style.backgroundColor = "var(--right-answer)";
} else {
cellElement.style.backgroundColor = "var(--wrong-answer)";
Expand Down

0 comments on commit 2f33d75

Please sign in to comment.