Currently in my Javascript project, I am faced with the challenge of converting an array into a string with curly braces around each word.
The input array is: ["apple", "brand", "title"]
Desired output: '{apple} {brand} {title}'
I have attempted using JSON.stringify and toString() methods without success. I also lack knowledge in working with regular expressions.
In the future, I will need to reverse this process and convert '{apple} {brand} {title}' back into an array. Is there a straightforward way to achieve this?