Hey there! I have a question about manipulating strings. Take a look at this example:
var string = '"In Another World" "Magic Books"'
I want to create an array that contains every name within the [""]. How can I achieve this?
Here's the desired outcome:
An array named 'Array' that includes each name from the string.
If the ["] is missing its pair, an error should be displayed.
For instance:
var string = '"example'
This should trigger an error message.
If there are no [""], the array should simply contain the string value.