Skip to content

Instantly share code, notes, and snippets.

@possan
Created January 31, 2012 23:22
Show Gist options
  • Save possan/1713733 to your computer and use it in GitHub Desktop.
Save possan/1713733 to your computer and use it in GitHub Desktop.

före

d = $('#dicesvalue').val().split(',')

_web.reportDices [
  parseInt(d[0]),
  parseInt(d[1]),
  parseInt(d[2]),
  parseInt(d[3]),
  parseInt(d[4])
]

efter

d = $('#dicesvalue').val().split(',')

d = d.map (x) -> parseInt(x)

_web.reportDices d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment