Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. let ids = [1, 2, 3];
  2.  
  3. function spread(id1, id2, id3) {
  4. console.log(`[id1]: ${id1}, [id2]: ${id2}, [id3]: ${id3}`);
  5. }
  6.  
  7. spread(...ids);
  8.  
  9. //[id1]: 1, [id2]: 2, [id3]: 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement