You want to create a function that takes an array of strings as arguments(all strings inside the array have the same length), and wants to create a new string that consists of the nth value of every string.
So to give a clear example: if the array of strings is [hat,pun,leg] the required output will need to be "hug". (first value of array1 "h", second value of array2 "u", third value of array3 "g")
This comment is hidden because it contains spoiler information about the solution
I don't think that last if statement is necessary to produce 0, as excla * ques by default equals 0 * 0= 0;
Nice work!
To describe the assignment a bit better:
You want to create a function that takes an array of strings as arguments(all strings inside the array have the same length), and wants to create a new string that consists of the nth value of every string.
So to give a clear example: if the array of strings is [hat,pun,leg] the required output will need to be "hug". (first value of array1 "h", second value of array2 "u", third value of array3 "g")
Hope this makes things clearer
Also, agree that the description is too ambiguous, and the test cases don't really make the assignment clear either.