hex_s = '0xEFA'
a = int(hex_s,16)
hex_n = hex(a)
print(hex_n)
const hexToDecimal = hex => parseInt(hex, 16);
const dec1 = hexToDecimal("2");
const dec2 = hexToDecimal("35");
const dec3 = hexToDecimal("1f4");
const dec4 = hexToDecimal("7b2");
const dec5 = hexToDecimal("123abc");
console.log(dec1); // 2
console.log(dec2); // 53
console.log(dec3); // 500
console.log(dec4); // 1970
console.log(dec5); // 1194684