How do you convert numbers between different bases in JavaScript?

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

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 159
  • Karma: 0
    • Hot Shaper
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 18
  • Posts: 898
  • 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
3198 Views
Last post 03-01-2015, 22:17:56
by uditsh
6 Replies
1552 Views
Last post 09-05-2012, 03:37:03
by sutha
2 Replies
1037 Views
Last post 04-16-2013, 16:43:40
by gomez
0 Replies
791 Views
Last post 11-14-2013, 10:18:18
by Shootingtime
0 Replies
424 Views
Last post 03-29-2016, 02:42:10
by chinmay.sahoo