ProAnswers.org

How to usehexadecimal numbers in calculation?

The hexadecimal numbers are converted to decimal numbers in all arithmetic operations.

       var hexNum = 0xA; 

       document.writeln(hexNum); //10 

       var aNum = 123; 

       document.writeln(hexNum + aNum); //133