It's about knowing what the function expects to receive.
What you got seems unexpected initially, but as you read the doc on this function (which took me a good 20 secs) you may think it is indeed well conceived, and realize that it was weird to expect passing an array of strings to it and expect it to work.. I don't even know what it should've done.
Should it have given you a single line of comma separated values? But then what should you give to the function to have multiple lines of csv? An array of array of strings?
What you got seems unexpected initially, but as you read the doc on this function (which took me a good 20 secs) you may think it is indeed well conceived, and realize that it was weird to expect passing an array of strings to it and expect it to work.. I don't even know what it should've done.
Should it have given you a single line of comma separated values? But then what should you give to the function to have multiple lines of csv? An array of array of strings?