Kotlinlearncs.online LogoJava
Return to List

Homework: First Two

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given a String return the String made of its first two chars. So the String "Hello" yields "He". If the string is shorter than length 2, return whatever there is, so "X" yields "X", and the empty string "" yields the empty string "".

Related Lessons

Stuck? You may find these lessons helpful: