7.1 Data Structures: Creating Arrays


#1

This is a simple exercise, but I'm not getting it.

https://www.codecademy.com/courses/ruby-beginner-en-F3loB/0/1?curriculum_id=5059f8619189a5000201fbcb#

I'm getting an error saying my code is not an array, but I input an array exactly how they say to in the hint. My code is below:

my_array = [num2, num3, num4]


#2

Have you defined num2, num3 and num4? If not, then ruby will tell you that you are using undefined variables and you would need to either define them or stop using them. Try value literals instead.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.