Concatenating First and Last Character of a String

Published by Nomove in

Create a function that takes a string and returns the concatenated first and last character.

Examples

FirstLast("forza") ➞ "fa"

FirstLast("kali") ➞ "ki"

FirstLast("always") ➞ "as"

FirstLast("love") ➞ "le"

FirstLast("edabit") ➞ "et"

Notes

There is no empty string.

Watch a quick demo on how Edabit works.