Pergunta de entrevista da empresa ServiceNow

1.To sort an array consisting of multiple zeros to right of an array without changing the order of previous numbers in JavaScript.