var half_length = Math.ceil(arrayName.length / 2);
var leftSide = arrayName.slice(0,half_length);
edited the code following @Lightness Races in Orbit and @pubkey comments.
var half_length = Math.ceil(arrayName.length / 2);
var leftSide = arrayName.slice(0,half_length);
edited the code following @Lightness Races in Orbit and @pubkey comments.