Mega Code Archive

 
Categories / Ruby / Language Basics
 

Use Parallel Assignment

Parallel Assignment is a way to assign a group or series of variables in one statement x = 100 y = 200 z = 500 #With parallel assignment, you do the same thing by separating the variables, then the values, with commas: x, y, z = 100, 200, 500