Guest User

Untitled

a guest
Apr 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. const outp = [].concat(inp);
  2.  
  3. [].concat('foo')
  4. // ['foo']
  5.  
  6. [].concat(['foo'])
  7. // ['foo']
  8.  
  9. var outp = Array.isArray(inp) ? inp : in[];
Add Comment
Please, Sign In to add comment