Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Jim Harrold
2,927 PointsThink it's bugged. Tried Array.new(), Array.new[], Array.new(array), Array.new[array], array = Array.new. Still stuck.
I think this question is bugged. I've tried multiple different ways to start a new array (some I'm sure are even right, ha!) and it keeps giving the error message about using the new String method.
5 Answers

Amanda Wagner
6,070 PointsIt's asking you to instantiate a new instance of the Array class called array. So it wants array = Array.new.

Will Long
5,449 PointsI think that it is just "array.new"

Will Long
5,449 Pointsyou don't need to put the parenthesis at the end

Salman Akram
Courses Plus Student 40,065 PointsHi Jim,
No it is not bugged, I even tried to test it as it is passed. :)
String # 1
variable = string
class = String
method = new
Array # 2
variable = array
class = Array
method = new
Example:
string = String.new
array = Array.new

Andrew Stelmach
12,583 PointsThe answer to the first question in the Code Challenge is:
string = String.new
You probably knew that already, right? Well, when you answered the next question, you probably deleted the first answer. Don't - leave it there and add your answer underneath the first one. The complete code challenge will look like this:
string = String.new
array = Array.new

Jim Harrold
2,927 PointsWow, this one feels especially...picky, ha. Thanks everyone for your help!
Amanda Wagner
6,070 PointsAmanda Wagner
6,070 PointsI can see why you would be confused though, throwing the word array in there automatically makes you think it needs some brackets.