Array Class The array class is used for storing values in an ordered list. You can add, read and delete values from it. Each item is stored against an index value, which is a positive whole number.
// new Array examples ns = [ 1, 2, 3 ] ns = new Array() // adding values ns.add( 5 ) ns.push( 2 ) ns.unshift( 3 ) // iterating ns.each() do |n| // code here end // iterating with key ns.each() do |i, n| // code here endNote that if you set a value outside of the size of the array, then all of the empty values will be padded with 'null'.
See Also
Check your mail!
Your account has been created, but you need to validate it before you can log in.
An email containing a validation link has been sent to your email address. Click the link to validate your account and log in. Please make sure to check your spam folder if it has not arrived.
Enter your username or account email address to reset your password.
username or email
sending...
PLEASE NOTE: a password reset link will be sent to the email address associated with your account. If it does not arrive, then please check your spam folder.
A link which will reset your password has been sent to your email address.
This link will be active for up to 24 hours.