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


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 : Thanks before!

4/6/2020 7:23:27 AM

Adam Fakhrul Rozi

3 Answers

New Answer


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


Thank You!