How To Fix The TODO 1? | SoloLearn: Learn to code for FREE!

+1

How To Fix The TODO 1?

Here's The Questions : TODO 1 : Complete the function declaration of getFirstAndLast with return type Map <String, Char> which used for get the first and last character from the receiver value. If this code running, the console will displaying text like this : First letter is K and n for second letter Here's the code. You can edit my code if my code was gonna wrong. I'm using Kotlin : https://code.sololearn.com/cfvIAew60m9Z/?ref=app Thanks before!

4/6/2020 7:23:27 AM

Adam Fakhrul Rozi

3 Answers

New Answer

+1

Note an empty string will cause an exception and one character string will return it for both keys.

+2

Thank You!

+1

https://code.sololearn.com/crK6eyYufs6z