Exercise: Printing Personal Information
Explore how to implement a Kotlin function that formats personal information by handling optional name, surname, and age parameters. Learn to construct clean string outputs while properly managing null values for flexible function usage.
We'll cover the following...
We'll cover the following...
Problem statement
Implement formatPersonDisplay function. It should have the String result type and the following parameters:
The
nameof typeString?and default valuenullThe
surnameof type ...