Oops, try again. Did you create a variable called my_message?


#1



Can you check my code?

https://www.codecademy.com/en/courses/ruby-beginner-en-MFiQ6/3/3?curriculum_id=5059f8619189a5000201fbcb#


says that it did not create variable called my_message.


class Message
    @@messages_sent =0
    def initialize (from, to)
        @from = from
        @to = to
        @@messages_sent += 1
    end



end
my_message = Message.new (1, 2)


#2

White space. That's the problem.

(ruby):8: syntax error, unexpected ',', expecting ')'
my_message = Message.new ("Me","You")
^
(ruby):8: syntax error, unexpected ')', expecting $end

This line,

should not have white space between new and ().

my_message = Message.new("Me","You")