[ create a new paste ] login | about

Link: http://codepad.org/ohuMRrlE    [ 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: 9798
String created: 97 98


Create a new paste based on this one


Comments: