simple and easy solution with javascript
here\'s my simple solution,if there is any suggestion for improvement or a better solution,feel free to share it in the comment section below \n\n\nvar canFormA
here\'s my simple solution,if there is any suggestion for improvement or a better solution,feel free to share it in the comment section below \n\n```\nvar canFormArray = function(arr, pieces) {\n\tlet total = "";\n    arr=arr.join("");\n    for (let i = 0; i < pieces.length; i++) {\n      pieces[i] = pieces[i].join("");\n      total += pieces[i];\n      if (arr.indexOf(pieces[i]) == -1) return false;\n    }\n    return total.length == arr.length;\n};\n```
['JavaScript']