Skip to content

Instantly share code, notes, and snippets.

@varmais
Created September 3, 2013 16:35
Show Gist options
  • Save varmais/6426283 to your computer and use it in GitHub Desktop.
Save varmais/6426283 to your computer and use it in GitHub Desktop.
reaktori
function (input) {
var nums = input.split(''), highest = 0;
for(var i = 4; i < nums.length; i++) {
var number = parseInt(nums[i-4]) * parseInt(nums[i-3]) * parseInt(nums[i-2]) * parseInt(nums[i-1]) * parseInt(nums[i]);
highest = number > highest ? number : highest;
}
return highest
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment