There was an error while loading. Please reload this page.
1 parent 4d4f668 commit 129ec51Copy full SHA for 129ec51
1 file changed
Conversions/DecimalToHex.js
@@ -13,7 +13,7 @@ function intToHex (num) {
13
function decimalToHex (num) {
14
const hexOut = []
15
while (num > 15) {
16
- hexOut.push(intToHex(num % 16))
+ hexOut.unshift(intToHex(num % 16))
17
num = Math.floor(num / 16)
18
}
19
return intToHex(num) + hexOut.join('')
0 commit comments