Skip to content

Instantly share code, notes, and snippets.

@koreus7
Created August 27, 2015 14:02
Show Gist options
  • Save koreus7/73404d1ffd3ea0402e51 to your computer and use it in GitHub Desktop.
Save koreus7/73404d1ffd3ea0402e51 to your computer and use it in GitHub Desktop.
How to short this into a while loop?
var lastValue = list[0]
for(var i = 1; i < list.length; i ++ )
{
lastValue = takeTwoValues(list[i],lastValue)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment