Which JavaScript method converts an array to a string?
-
A
join()
-
B
toString()
Correct answer
-
C
convert()
-
D
stringify()
Correct answer
B. toString()
10 views
Explanation
toString() converts an array to a comma-separated string. Source: Standard JavaScript content (FBISE-aligned).
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ