How do I filter an array?
-
There is an array that has subarrays:
[1, 'string', [3, 4], 5, [6, 7]]
.
Only subarrays should be left:[[3,4], [6,7]]
.JavaScript Wyatt Steele, Apr 28, 2019 -
arr.filter (Array.isArray);
Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!