Guest User

Untitled

a guest
May 20th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. The comma operator evaluates both of its operands (from left to right) and returns the value of the most right-hand operand.
  2.  
  3. ```
  4. var a = (7, 5);
  5. a; //5
  6.  
  7. var x, y, z
  8. x = (y=1, z=4);
  9. x; //4
  10. y; //1
  11. z; //4
  12. ```
  13. ```
  14. students.map(s => (s.archived = true, s))
  15. ```
Add Comment
Please, Sign In to add comment