I have the following array
cities = [\"Kathmandu\", \"Pokhara\", \"\", \"Dharan\", \"Butwal\"]
I want to remove blank elements from the ar
Here is what works for me:
[1, "", 2, "hello", nil].reject(&:blank?)
output:
[1, 2, "hello"]