Tell me how do you remove nil values in array using ruby?
Answer / Gaurav Krishan
"In Ruby, you can remove all nil elements from an array by calling the compact method on it. Example: arr = [1,nil,2,nil].compact will return [1,2]."
| Is This Answer Correct ? | 0 Yes | 0 No |
Interpolation is a very important process in Ruby, comment.
What does ruby name refers to?
What is the naming conventions for methods that return a boolean result?
Name some operators used in ruby.
Mention what is the difference between a gem and a plugin in ruby?
What are ruby variables.
what is the difference between String and Symbol?
What is the difference between extend and include?
What is the difference between “#==” and “#equal?”
Explain do while loop in ruby.
Please explain what is mvc and why do we use it?
List some features of ruby?