Can you please explain what is the difference between string and symbol?
Answer Posted / Asha Rani
In Ruby, a String represents a sequence of characters, while Symbol represents an immutable identifier. Strings are used for storing textual data, whereas symbols are often used as keys in hashes.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers