Move Zeros to End

Result

The new list:

View Code

Instructions / Examples:

Return the single line — the name of the person who drinks the n-th can of cola. The cans are numbered starting from 1.

moveZeros([false,1,0,1,2,0,1,3,"a"]) // returns[false, 1,1,2,1,3,"a",0,0]