Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Forked from austinbv/x.coffee
Created August 28, 2011 23:18
Show Gist options
  • Save robotlolita/1177377 to your computer and use it in GitHub Desktop.
Save robotlolita/1177377 to your computer and use it in GitHub Desktop.
// create an array of terms from an array of objects
for item in trend.search_terms
search_terms.push(item.term)
// while a part of the array is left
while search_terms.length > 0
// create a mini array of 7 items
for num in [0..7]
x = search_terms.pop()
if x?
search_string.push(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment