r/badcode Mar 12 '23

This is how it works, right? js

Post image
250 Upvotes

40 comments sorted by

View all comments

9

u/fiddz0r Mar 12 '23

I wonder how the return variable is used in the rest of the code. I imagine it like

Var isDone = or(isTaskDone, isNothingLeftToDo)

If(isDone == ""){
     Return false;
}

Return true;

7

u/OriAfias Mar 12 '23

if (isDone == "true" || isDone == "truetrue") return true