a,b=1,2
=>[1,2]
a,b=[1,2]
=>[1,2]
i newbie on ruby,i have alchknowlege of python in python there also have this feature
what dose this feaure called in ruby,and also i have one thing confused
why after given the value to the a,b varient,the output a array?
Both are same, try this in IRB:
Ruby docs is your best friend + IRB ofcourse. There are many good tutorials out there, choose one which suits you.