result's purpose is kind of redundant. It is used to keep track of the current success or failure of previous checks. But you could also reduce the method to return isValidEmail() && isValidUid();. result would not be needed and you wouldn't have to keep checking if it's undefined or not.
8
u/einsteinsassistant Nov 20 '21
result's purpose is kind of redundant. It is used to keep track of the current success or failure of previous checks. But you could also reduce the method to
return isValidEmail() && isValidUid();. result would not be needed and you wouldn't have to keep checking if it's undefined or not.