DEV Community

Robert Teminian
Robert Teminian

Posted on

Oops at 28 Jun 2024

Long time no see, dev.to community! Today I'd like to share yet another OOPS moment I encountered last month.
오랜만입니다! 오늘은 지난달에 맞부딪친 얼라리요......를 가지고 이야기해보고자 합니다.

So, here's a code:

if(condition1) do_something();
if(condition2) do_something_else();
else do_yet_another();
Enter fullscreen mode Exit fullscreen mode

Nothing much, huh? But, the problem is, the code should have been this way:
뭐, 별거 없긴 합니다만, 사실 문제는 코드가 원래 이런 식이어야 했다는 겁니다:

if(condition1) do_something();
else if(condition2) do_something_else();
else do_yet_another();
Enter fullscreen mode Exit fullscreen mode

Well, don't tell me you had no chance to experience something like this. ;)
뭐, 다들 이런 경우 한 번씩은 경험해 보시지 않으셨으려나요? ;)

Top comments (0)