Skip to content

Instantly share code, notes, and snippets.

@superbrothers
Created November 27, 2011 03:16
Show Gist options
  • Save superbrothers/1396882 to your computer and use it in GitHub Desktop.
Save superbrothers/1396882 to your computer and use it in GitHub Desktop.
# 1
data = if obj.data? then ("#{key}=#{value}" for key, value of obj.data).join "&" else null
# 2
data = if obj.data?
("#{key}=#{value}" for key, value of obj.data).join "&"
else
null
# 3
data = if obj.data?
(for own key, value of obj.data
"#{key}=#{value}"
).join "&"
else
null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment