Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How would you improve this little jQuery Dice Roller?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37033

    Trying to teach myself a few things, and am wondering how I could improve this code: http://jsfiddle.net/joshnh/K5tCE/

    Basically I’m after alternate/better ways to code it, and ways to streamline it. Thanks in advance guys!

    Also, how do you guys remember what does and doesn’t have a semicolon after it?

    #98453
    karlpcrowley
    Participant

    http://jsfiddle.net/K5tCE/27/
    I’ve added comments where I’ve changed
    The , was changed to ; because the variable “value” was being re-declared instead of redefined

    Functions don’t need to end in ; just lines within the function

    #98458

    Ah, awesome. Good catches Karl. Thanks mate!

    #98459
    karlpcrowley
    Participant

    I was trying to find a font that would change numbers to die faces
    but….
    wait for it….

    … no dice
    lol

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.