Question: JAVASCRIPT Function 3: Insert delimiter and join content of array as one string Write a function that accepts three arguments (an array, delimiter, and a
JAVASCRIPT
- Function 3: Insert delimiter and join content of array as one string
- Write a function that accepts three arguments (an array, delimiter, and a number). The function would join content of the array to form a string, inserting the delimiter after every nth element of the array and displays resulting string in console:
functionName([0, 2, Hello, 7, TO, ---], +, 3); // would produce following message in console:
- 02Hello+7TO---+
- PLEASE EXPLAIN THE CODE THANK YOU
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
