href
containing a #
, like you might have within an in-page link, but not an href
that only has the value #
, as you would have with a placeholder "dead" link. And then assign that click handler to it.
.container{
display:flex;
justify-content: space-around;
margin-top: 3em;
}
function chunkArrayInGroups(arr, size) {
console.log('length of array', arr.length);
console.log('size', size);
var newArray = [];
for (var i = 0; i < arr.length; i+=size) {
console.log('loop' + i);
newArray.push(arr.slice(i, i+size));
} console.log('newArray', newArray);
return newArray;
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);
:cookie: 550 | @korzo |http://www.freecodecamp.com/korzo
:star2: 2476 | @lydatech |http://www.freecodecamp.com/lydatech