BOSTON — The pandemic has taken a toll on the test scores of Massachusetts students, according to statewide MCAS test results from the spring 2021 exam released Tuesday by the state Department of Elementary and Secondary Education. Overall, the results revealed that many more students had gaps in their knowledge of math and, to a lesser extent, English language arts, compared with students in the same grades before the COVID-19 pandemic, with fewer students meeting or exceeding grade level expectations, according to education officials. The state did not administer MCAS tests near the beginning of the pandemic in spring 2020.