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.
Array slicing
Remove parentheses
Report a typo
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) {
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.