I'm having a problem with an array in javascript. I have this array:
Subjects[]:
[0] = 'Introduction to interesting things'
[1] = 'Cats and dogs'
[2] = 'I can't believe it's not butter Á machine lord'
[3] = 'I Intergalactic proton powered advertising droids '
As you can see, in Subjects[2], there are 2 strings
'I can't believe it's not butter' and 'Á machine lord'
Also, in Subjects[3], the string starts with 'I', which is supposed to be
'Á machine lord I'.
Is there a way to cut the string where the uppercase starts and create a new index for the string? Like this:
Subjects[]:
[0] = 'Introduction to interesting things'
[1] = 'Cats and dogs'
[2] = 'I can't believe it's not butter'
[3] = 'Á machine lord I'
[4] = 'Intergalactic proton powered advertising droids'
I have tried using .split
with no success. Any help will be usefull.