Comments using #


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-ruby/lessons/introduction-to-ruby/exercises/single-line-comments?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>
If i mentioned variable declaration as a comment, then why i am still getting my output. As of Ruby interpreter won’t excecute the comment section.
My doubt is ruby interpreter will access the variable declaration even though it is in comment section. Please clarify it. Thanks

```

#m=“hello” #this is a sample string
puts m.length #this will tells length of a string

<do not remove the three backticks above>

https://www.codecademy.com/courses/learn-ruby/lessons/introduction-to-ruby/exercises/single-line-comments?action=lesson_resume

#2

Did you try it???
What happened?
This is a very easy theory to test


#3

Yes!
But i think the problem is with the executor provided by code-academy. It once executed, then the code running around the same output, no matter what you edit in the code. Just have to reset the work space.

Thanks anyway


#4

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