From 1beb3edc6ad73465fd6478e34879169d28fba87e Mon Sep 17 00:00:00 2001 From: Rizal Fahlevi Date: Fri, 3 May 2024 23:59:56 +0700 Subject: [PATCH] logaritma done --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index d60fadb..a1b59be 100644 --- a/script.js +++ b/script.js @@ -37,7 +37,7 @@ function operator(value, format) { operation.value = data.formats.join(''); result.value = data.result; } else { - if (data.operations.length > 0 && isNaN(parseFloat(data.operations[data.operations.length - 1]))) { + if (data.operations.length > 0 && data.resultformat.length === 0 && isNaN(parseFloat(data.operations[data.operations.length - 1]))) { data.operations.pop(); // Hapus operator terakhir jika ada data.formats.pop(); } else {