January 6 - Add the Next Letter or Number in a String Sequence in Ruby
In this Ruby coding exercise you'll learn how to add the next element in a sequence of numbers or letters.
Guide Tasks
- Read Tutorial
- Watch Guide Video
- Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license
Already a Bottega Student? Sign In
Summary
Build a method that takes in a sequenced string of letters or numbers and returns a string that contains the input string with the next element in the sequence.
Exercise Description
Given the following string:
"abc"
Write a method that returns the next element in the string concatenated with the input string.
Sample Output
"abcd"
Real World Usage
String manipulation is utilized in Ruby development on a regular basis. There are some build in methods in Ruby that come close to delivering this behavior, however you need to extend their functionality to get the desired behavior.