JavaScript MCQ Javascript Functions MCQ Question #4873
Single Choice Not Set

QWhat does the join() function do in JavaScript?

ID: #4873 Javascript Functions MCQ 224 views
Question Info
#4873Q ID
Not SetDifficulty
Javascript Functions MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Joins the elements of an array into a string
  • B Splits a string into an array of substrings
  • C Removes whitespace from a string
  • D none of these
Correct Answer

Explanation

The join() function joins the elements of an array into a string.
It takes an optional separator as an argument, which is used to separate the elements in the resulting string.
If no separator is provided, the elements are joined with a comma.

Share This Question

Challenge a friend or share with your study group.