004 solution in js
-