Comparing two arrays

Certified Associate Developer

Hi,

Is there any straightforward method to compare below two arrays in such a way that, SelectedAnswersArray[1]=correctAnswersArray[1] , SelectedAnswersArray[2]=correctAnswersArray[2] and SelectedAnswersArray[3]=correctAnswersArray[3] .

SelectedAnswersArray: {"a","c","b"}

correctAnswersArray: {"a","b","c"}

  Discussion posts and replies are publicly visible