Just starting out with JavaScript array matching!
I've got two arrays, both with 11 elements each:
txtfilename=['txt1','txt6','txt6','txt6','txt7','txt7','txt8','txt9','txt9','txt9','txt9']
content=['apple from one','six trees','cats','happy dogs','healthy fruit','good job','ask question','check safety','stay in the house','good results','happy holiday']
The position of elements in txtfilename matches the position of elements in content.
For example: the 2nd element in txtfilename corresponds to the 2nd element in content.
However, txtfilename has duplicate elements while content is unique.
I'm struggling to match these arrays and would like to display them as follows:
txtfilename: txt1
content: apple from one
txtfilename: txt6
content: 'six trees', 'cats', 'happy dogs'
txtfilename: txt7
content: 'healthy fruit', 'good job'
txtfilename: txt8
content: 'ask question'
txtfilename: txt9
content: 'check safety', 'stay in the house', 'good results', 'happy holiday'