Skip to content

Commit

Permalink
gimme my old code back please
Browse files Browse the repository at this point in the history
  • Loading branch information
amaldonado9 authored Nov 17, 2024
1 parent b8695f1 commit 0b78f0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ const currCode = "000000";
function calculate(value) {
try {
const trimmedValue = value.trim();

if (trimmedValue === `${currCode}*`) {
res.value = "Reset successfully!";
resetit();
return;
}

if (trimmedValue === currCode) {
res.value = "Opened in new tab!";
boutmyBLANK();
return;
}

const sanitizedValue = trimmedValue.replace(/[^0-9+\-*/.]/g, '');
if (!sanitizedValue) {
throw new Error("Invalid input...");
Expand Down

0 comments on commit 0b78f0f

Please sign in to comment.