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

54.29% Correct | 45.71% Incorrect
Last Solution submitted on Jul 10, 2020

Problem Comments

Solution Comments

Problem Recent Solvers2550

Suggested Problems

More from this Author56