How do you convert numbers between different bases in JavaScript?

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

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
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 55
  • Posts: 837
  • 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
6 Replies
2840 Views
Last post 09-05-2012, 03:37:03
by sutha
2 Replies
1584 Views
Last post 04-16-2013, 16:43:40
by gomez
0 Replies
2365 Views
Last post 11-14-2013, 10:18:18
by Shootingtime
0 Replies
1283 Views
Last post 03-29-2016, 02:42:10
by chinmay.sahoo
1 Replies
1220 Views
Last post 01-21-2021, 04:54:46
by Lishmalinyjames