The swirl lesson hasn't been updated since the change in R 4.3.0 where '&&' no longer accepts a vector of length > 1. Previously, as indicated in Swirl, the first element of the vector would be assessed, now it returns an error. The same is true for the non-vectorised OR '||'
You can't get passed this question with the lesson as it is written. I have put in a pull request on github for it to be fixed.
In the meantime, you can either directly edit the lesson .yaml file (i.e. find and delete the '&&' and '||' questions), the file is at:
file.path(find.package("swirl"),"Courses","R_Programming","Logic","lesson.yaml")
Alternatively you can download the lesson I have editted for the pull request by running these three lines (you may need to start swirl with a different nickname when it asks):
# create file path to swirl lesson file
file_path <- file.path(find.package("swirl"),"Courses","R_Programming","Logic","lesson.yaml")
# url of my edited lesson file
file_url <- "https://raw.githubusercontent.com/daniel-j-miller/swirl_courses/master/R_Programming/Logic/lesson.yaml"
# download and save file
download.file(file_url, file_path)