Error – Expected an assignment or function call and instead saw an expression

Expected an assignment or function call and instead saw an expression is a common error whenever I forget adding return keyword to a function. In the else if return statement, I missed the return keyword, causing this error. Problem solved.