Skip to content

Commit

Permalink
Merge pull request #1814 from jennifereunice/matherror
Browse files Browse the repository at this point in the history
cleared the bug
  • Loading branch information
swapnilsparsh authored Jun 18, 2024
2 parents ec5ca24 + 97b8edd commit 1999667
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 108 - Maths addition/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ button.addEventListener('click', function () {

let guess = document.getElementById('guess').value;
guess = Number(guess);
if(guess==" ")
{
alert("please enter the value")
}

//check answer
if (guess === total) {
else if(guess === total) {
alert('Correct');
window.location.reload()
} else {
Expand Down
1 change: 1 addition & 0 deletions 108 - Maths addition/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<body>
<div id="canvas">
<div id="primary-number">7</div>

<div id="add">+</div>
<div id="secondary-number">10</div>
<div id="equal">=</div>
Expand Down

0 comments on commit 1999667

Please sign in to comment.