diff --git a/homeworks/week2/hw5.js b/homeworks/week2/hw5.js index d8e3b5b..5560b07 100644 --- a/homeworks/week2/hw5.js +++ b/homeworks/week2/hw5.js @@ -1,10 +1,25 @@ function join(arr, concatStr) { - + var temp = '' + if (arr.length === 1) { + temp = arr[0] + concatStr + } else { + for (i = 1; i