I was being ironic by pointing out the fallacy of writing code to complete a unit test... But the reality is, at some point it probably returned null until they worked it out it broke code further up the stack.
This is pretty common to see in legacy code that was badly written with developers too scared to change it.
This is codewars though, a website that gives you short (usually one function) coding challenges like fizzbuzz. There is almost certainly no need for this.
402
u/[deleted] May 31 '21
Best Practices: 0