Skip to content

Instantly share code, notes, and snippets.

@agileurbanite
Created October 23, 2015 05:05
Show Gist options
  • Save agileurbanite/932f23bd6f67f687091e to your computer and use it in GitHub Desktop.
Save agileurbanite/932f23bd6f67f687091e to your computer and use it in GitHub Desktop.
Chocolate Bar
var arr = [5,6,7,8], floor, ceil;
for(var i = 0; i < arr.length; i++) {
floor = Math.floor(arr[i] / 2);
ceil = Math.ceil(arr[i]/2);
console.log(floor * ceil);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment