Remove parentheses

Report a typo

In the code below there's a function called parentheses. It should accept a string enclosed in parentheses and return an array containing the characters inside them.

Sample Input 1:

(345)

Sample Output 1:

[ '3', '4', '5' ]

Sample Input 2:

(yellow)

Sample Output 2:

[ 'y', 'e', 'l', 'l', 'o', 'w' ]
Write a program in JavaScript
function parentheses(string) {

}
___

Create a free account to access the full topic