Ad
  • Default User Avatar

    In this case your if statement is redundant :)

    Anytime you have code of the form

    if (statement) { 
      return true 
    } else { 
      return false
    }
    

    you can simplify by doing return statement;

    Should the returns be backward you can invert the statement.