Javascript practice

Created the function that sorts odd and even numbers apart. did it
without a boolean though, was unsure how to with a boolean in the
function.