Solve problems with the shortest JS code