loading...

re: Writing code for your future self VIEW POST

FULL DISCUSSION
 

Very good article! Thanks.

I just noticed that in the refactored code

return isLengthValid && isAlphanumeric && isUsernameTaken;

should rather be

return isLengthValid && isAlphanumeric && !isUsernameTaken;
 

You're right, good catch! Maybe I should write unit tests for my article code blocks haha.

Code of Conduct Report abuse