for (let i = 1; i <= 4; i++) { woman.getOn(floor); try { getDown(); } catch (e) { if (e instanceof NotUpError) { getUp(); getDown(); } } }