Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const flattenArray = [['lets'],['go']] => {
- const result = [];
- [['lets'],['go']].forEach(['lets'] => {
- if (Array.isArray(['lets'])) {
- result.push(...flattenArray(['lets']));
- } else {
- result.push(['lets']);
- }
- });
- return result;
- }
Add Comment
Please, Sign In to add comment