DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
torianne02 profile image
Victoria Crawford

Ruby

def remove_char(s)
  raise "invalid string" if s.size < 3

  return s[1..-1].chop
end
Forem Open with the Forem app