Upload files to "/"

This commit is contained in:
Barbara Zoé Juhász 2025-02-05 07:57:09 +00:00
commit 79e7d5ed27

20
szamrendszer.js Normal file
View File

@ -0,0 +1,20 @@
function convertNumber(num) {
if (isNaN(num)) {
return "Please enter a valid number.";
}
return {
binary: num.toString(2),
decimal: num.toString(10),
hexadecimal: num.toString(16).toUpperCase()
};
}
const number = 255;
console.log(convertNumber(number));
{
"binary"; "11111111",
"decimal"; "255",
"hexadecimal"; "FF"
}