Vidyalelo
JavaScript · Q5

Array And Function

Programming · JavaScript · question 5

Q5

What will happen if reverse() and join() methods are used simultaneously ?

A.
Reverses and stores in the same array
Answer
B.
Reverses and concatenates the elements of the array
C.
Reverses
D.
All of the mentioned

Answer: Option A

Solution

Answer: Option A
Solution:
The reverse() followed by a join() will reverse the respective array and will store the reversed array in the memory.