Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.11 KB | None | 0 0
  1. const arr = [[1, 2, [3]], 4];
  2. const numberPattern = /\d+/g;
  3. arr.toString().match(numberPattern).map(e=>parseInt(e));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement