Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPoJung Chen
5,856 PointsI am no sure where the code error in Ruby - Object and Classes challenge
I enter the code below:
create a BankAccount class
class BankAccount def initialize(name, transactions) @name = name @transactions = Array.new end end
I continue getting the error message showing that "It looks like Task 2 is no longer exists". However, after I go back to Task 2, I pass the task with the same code. Any idea for the problems?
# create a BankAccount class
class BankAccount
def initialize(name, transactions)
@name = name
@transactions = Array.new
end
end
2 Answers
roberthopman
16,502 PointsCorrect code below
class BankAccount
def initialize(name)
@name = name
@transactions = Array.new
end
end
PoJung Chen
5,856 PointsI find what the error from. I need to remove the arguments "transactions" in parentheses.