Array.prototype.joinbeginnerconst words = ['Hello', 'World']
words.join(' ') // β 'Hello World'Use join() to concatenate all array elements into a single string with a separator.
Array.prototype.join(separator?) joins all elements of an array into a single string, separated by the given separator. The default separator is a comma (,).
Challenge: Implement joinWithComma(arr) that joins the array with ', ' (comma followed by space).
joinWithComma(['a', 'b', 'c']) // β 'a, b, c'
joinWithComma(['one']) // β 'one'