1977 JavaScript Quizzes

Câu hỏi

Consider the following two arrays and operations on them. What gets logged as a result of script execution ?

const ar = [5, 1, 3, 7, 25];
const ar1 = ar;
console.log(ar1.sort());
([5, 25].indexOf(ar[1]) != -1 &&
  console.log(ar.reverse())) ||
  (ar[3] == 25 && console.log(ar));
console.log(ar1);