DEV Community

Discussion on: How to Validate a Palindrome

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

I will never understand why people write functions that are basically:

function testSomething(param) {
   if (someBooleanExpression) {
      return true;
   } else {
      return false;
   }
}

If I saw this from a job applicant in a coding test, I would likely not hire them - unless they could give a convincing reason why they've done it this way.