Update szamrendszer.js
This commit is contained in:
parent
bdd1c2b323
commit
ccd306a7d8
|
@ -9,7 +9,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
function convertNumber(value, fromBase, toBase) {
|
||||
let decimalValue;
|
||||
|
||||
// Convert input to decimal first
|
||||
switch (fromBase) {
|
||||
case "bináris":
|
||||
decimalValue = parseInt(value, 2);
|
||||
|
@ -31,7 +30,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
return "Érvénytelen szám";
|
||||
}
|
||||
|
||||
// Convert decimal to target base
|
||||
switch (toBase) {
|
||||
case "bináris":
|
||||
return decimalValue.toString(2);
|
||||
|
|
Loading…
Reference in New Issue
Block a user