function oddEvenList(head) {
if (!head) return head;
var odd = head;
var even = head.next;
while (odd.next && odd.next.next) {
var tmp = odd.next;
odd.next = odd.next.next;
odd = odd.next;
tmp.next = odd.next;
}
odd.next = even;
return head;
}
JavaScript Solution

It seems this solution does not work for even length arrays such as [1,2,3,4,5,6,7,8]. That can be corrected by adding a conditional check:
var oddEvenList = function(head) { if (!head) return head; var odd = head, even = head.next; while (odd && odd.next ) { var tmp = odd.next; odd.next = odd.next.next; if ( odd.next ) { odd = odd.next; tmp.next = odd.next; } } odd.next = even; return head; };