Cody

Problem 649. Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the function should give that character back twice since it is both the first and last character of the string.

Example:

   stringfirstandlast('boring example') = 'be'

Solution Stats

57.6% Correct | 42.4% Incorrect
Last solution submitted on Jul 20, 2019

Problem Comments

Solution Comments