How do you convert numbers between different bases in JavaScript?

Author Topic: How do you convert numbers between different bases in JavaScript?  (Read 518 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 153
  • Karma: 0
    • No Addiction
Use the parseInt() function, that takes a string as the first parameter, and the base as a second
parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);


Offline TomClarke

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 17
  • Posts: 897
  • Karma: 0
  • Gender: Male
    • Custom Writing Service & Content Marketplace
You are exactly right!
This all is performed in this way!
Your ideas, our writings - Writology.com

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
3138 Views
Last post 03-01-2015, 22:17:56
by uditsh
6 Replies
1495 Views
Last post 09-05-2012, 03:37:03
by sutha
2 Replies
999 Views
Last post 04-16-2013, 16:43:40
by gomez
0 Replies
762 Views
Last post 11-14-2013, 10:18:18
by Shootingtime
0 Replies
381 Views
Last post 03-29-2016, 02:42:10
by chinmay.sahoo