pulusatapathy

flat method

Oct 23rd, 2020
692
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const arr1 = [1, 2, [3, 4]]
  2. console.log(arr1.flat())
  3.  
  4.  [1, 2, 3, 4]
RAW Paste Data