[ create a new paste ] login | about

Link: http://codepad.org/ybmXU9s3    [ raw code | output | fork ]

Ruby, pasted on Jan 21:
1
2
3
4
5
6
7
8
9
10
11
12
seqNum = 0
ranNum = rand(2)
extractedArray = []
letterArray = [["a","b","c","d"],["A","B","C","D"]]

while seqNum < 2
  extractedArray.push(letterArray[seqNum][ranNum])
  seqNum += 1
end

puts "Array contents: " + extractedArray.to_s
puts "String created: " + extractedArray.join(sep=" ")


Output:
1
2
Array contents: bB
String created: b B


Create a new paste based on this one


Comments: