Q. Which one of the following options is the correct output for the given code of JavaScript?
Code:
var arr=[4,3,2,1]; var rev=arr.reverse(); document.writeln(rev);
β
Correct Answer: (B)
4, 3, 2, 1