Kotlinlearncs.online LogoJava
Return to List

Solve: nTwice

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given a String and an Int n, return a string made of the first and last n chars from the String. The String length will be at least n.

fun nTwice(
input: String,
n: Int,
): String {
return "" // You may need to remove this starter code

Related Lessons

Stuck? You may find these lessons helpful: