Q:

Write a Ruby program to remove all white space within a string

0

Write a Ruby program to remove all white space within a string.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def check_string(my_string)
   return my_string.delete(' ')
end
print check_string("Ja v aS cr     ip      t")

Output:

JavaScript

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now