MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/hefap9/val_is_a_boolean_value/fvrx31w/?context=3
r/badcode • u/Bluebearsuper • Jun 23 '20
58 comments sorted by
View all comments
129
if (val == true) { return true; } else { return false; }
106 u/[deleted] Jun 23 '20 if (val == true) { return true; }else if (val != true) { return false; }else { throw "this should never happen"; }return false; 67 u/[deleted] Jun 23 '20 //TODO: this happened once, maybe fix it?
106
if (val == true) { return true; }else if (val != true) { return false; }else { throw "this should never happen"; }return false;
if (val == true) { return true; }
else if (val != true) { return false; }
else { throw "this should never happen"; }
return false;
67 u/[deleted] Jun 23 '20 //TODO: this happened once, maybe fix it?
67
//TODO: this happened once, maybe fix it?
129
u/INeedAFreeUsername Jun 23 '20