include? reverse ruby
# Step 1: Define a string variable
string_variable = "ruby"
# Step 2: Use the include? method to check if a substring is present in the string
substring_check = string_variable.include?("reverse")
# Step 3: Use the reverse method to reverse the string
reversed_string = string_variable.reverse
# Step 4: Output the results
puts "Substring 'reverse' present in the string: #{substring_check}"
puts "Reversed string: #{reversed_string}"