what is the difference between String and Symbol?
Answer / Dherendra Jain
Strings in Ruby are objects that represent sequences of characters, while symbols are lightweight objects that represent unique identifiers. Strings can be concatenated with the + operator or interpolated within double quotes, while symbols use the : colon before their identifier.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are advantages of using ruby?
What does ruby name refers to?
Explain for loop in Ruby?
Are ruby strings are mutable?
Does hash use “ #==” or “#eql?” To compare hash keys?
Mention what is the difference between a gem and a plugin in ruby?
Who is the developer of Ruby?
What things we can define in the model?
In Ruby code, often it is observed that coder uses a short hand form of using an expression like array.map(&:method_name) instead of array.map { |element| element.method_name }. How this trick actually works?
Explain about variables?
How would you freeze an object in ruby? Can you provide a simple example?
What is yield statement in ruby.