An electronic device comprising: a flexible display; a first body and a second body supporting the flexible display; a hinge unit foldably connected with the first body and foldably connected with the second body, the hinge unit comprising a first rotation shaft (5a-1) and a second rotation shaft (5a-2), wherein, when the flexible display is folded or unfolded, the first body is configured to rotate about the first rotation shaft (5a-1) and is configured to slide with respect to the first rotation shaft (5a-1), and the second body is configured to rotate about a second rotation shaft (5a-2) and is configured to slide with respect to the second rotation shaft (5a-2), and a path difference compensating unit including first and second restriction pins (5b-1, 5b-2) and first and second restriction slots (1c, 2c) for restricting the movement of the first and second bodies (1, 2), wherein the first restriction slot is provided in the first body, the second restriction slot is provided in the second body, and the first and second restriction pins (5b-1, 5b-2) are provided in the hinge unit, wherein the first and second restriction pins (5b-1, 5b-2) are respectively inserted into the first restriction slot and the second restriction slot and have fixed positions with respect to both the first and second rotation shafts (5a-1, 5a_2), so that when the flexible display is folded or unfolded, the first body and the second body are configured to, respectively, first move away from the first rotation shaft (5a-1) and the second rotation shaft (5a-2) and then move closer to the first rotation shaft (5a-1) and the second rotation shaft (5a-2) respectively as the first body and the second body rotate. a flexible display; a first body and a second body supporting the flexible display; a hinge unit foldably connected with the first body and foldably connected with the second body, the hinge unit comprising a first rotation shaft (5a-1) and a second rotation shaft (5a-2), wherein, when the flexible display is folded or unfolded, the first body is configured to rotate about the first rotation shaft (5a-1) and is configured to slide with respect to the first rotation shaft (5a-1), and the second body is configured to rotate about a second rotation shaft (5a-2) and is configured to slide with respect to the second rotation shaft (5a-2), and a path difference compensating unit including first and second restriction pins (5b-1, 5b-2) and first and second restriction slots (1c, 2c) for restricting the movement of the first and second bodies (1, 2), wherein the first restriction slot is provided in the first body, the second restriction slot is provided in the second body, and the first and second restriction pins (5b-1, 5b-2) are provided in the hinge unit, wherein the first and second restriction pins (5b-1, 5b-2) are respectively inserted into the first restriction slot and the second restriction slot and have fixed positions with respect to both the first and second rotation shafts (5a-1, 5a_2), so that when the flexible display is folded or unfolded, the first body and the second body are configured to, respectively, first move away from the first rotation shaft (5a-1) and the second rotation shaft (5a-2) and then move closer to the first rotation shaft (5a-1) and the second rotation shaft (5a-2) respectively as the first body and the second body rotate.