34,333
edits
Changes
→Declaring a Variable
</pre>
We have now created a variable called y and assigned it the value of 10. In common with some other scripting languages, Ruby supports something called ''parallel assignment''. This is useful if you need to assign values to a number of variables. One way to do this would be as follows: <pre>a = 10b = 20c = 30d = 40</pre> The same result can be achieved more quickly, however, using parallel assignment: <pre>a, b, c, d = 10, 20, 30, 40</pre>
== Identifying a Ruby Variable Type ==