SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast seezee's Avatar
    Join Date
    Jun 2010
    Location
    Oklahoma, USA
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simply Javascript animation example parseInt question

    In the example on page 184 of the 1st printing of Simply Javascript, the authors include this line:
    Code:
    SoccerBall.originX = parseInt(
    Core.getComputedStyle(SoccerBall.div, "left"), 10);
    This code calculates the animated soccer ball's starting position. My question is, what is the significance of the interger '10' in the example?

    Thanks,

    --cz

  2. #2
    SitePoint Evangelist TommiChi's Avatar
    Join Date
    Oct 2008
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 10 represents the radix (A number from 2 to 36 that represents the numeral system to be used).

    If you need any more info I suggest you google it, you will find all the info you need

  3. #3
    SitePoint Enthusiast seezee's Avatar
    Join Date
    Jun 2010
    Location
    Oklahoma, USA
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks. I actually ran across a reference to this earlier today & didn't make the connection.

    Cheers,

    --cz


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •