Explain the difference between a single quote and double quote?
Answer Posted / Tarakeshwar Kumar Puri
In Ruby, single quotes (') create strings that ignore escape sequences and do not interpret special characters. Double quotes (") create strings that do interpret escape sequences and allow for interpolation of variables using #{variable_name}. Single quotes are generally faster because they don't need to parse the string for variable substitution.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers