What is the difference between a statement and an expression in ruby?
Answer / Shivani Goyal
In Ruby, a statement ends with a semicolon (;) or a newline. It performs an action such as assigning a value to a variable or calling a method. An expression also performs an operation but it returns a value. In Ruby, most statements are expressions.
| Is This Answer Correct ? | 0 Yes | 0 No |
What function converts all html special symbols to html entities in ruby?
What is the difference between nil and false in ruby?
How to check whether a directory exist or not in Ruby?
Tell me how you can create a controller for subject?
How ruby looks up a method to invoke?
Explain about the defined operator in ruby?
Explain about environment variables present in ruby?
What is the use of global variable $ in Ruby?
Explain about normal method class?
Which ruby interpreter option enables debugging?
Ruby support single inheritance/multiple inheritance or both?
What are the different environment variables present in the ruby?