hello, please help. I need to write a function that converts a two-dimensional array to CSV format and returns a string. Valid values as array elements are numbers and strings. If a function is encountered, throw an error with the text “Unexpected value”. Example:
JavaScript:
arraysToCsv([[1, 2], ['a', 'b']]) // '1,2
a,b'
arraysToCsv([[1, 2], ['a,b', 'c,d']]) // '1,2
"a,b","c,d"'