Ruby - Beginner - Dividing using 2D Array -


I do not know how to call on the second part of the 2D array.

  array = [[['dog', 5], ['cat', 10]] num = 10 points / array [0,1]    

  array = [[dog ', 5], [' cat ', 10]] num = 10 puts num / array [0] [1] puts # 10/5 = 2 points / array [1] [1] # 10/10 = 1    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -