Write a function called url that creates a URL of a resource. The function has two parameters host and port and returns the URL in the following format: https://HOST:PORT. Both host and port parameters are optional and have the following default values: localhost and 443 respectively.
Named arguments
URL
Report a typo
Write a program in Kotlin
fun url(host: String, port: Int): String {
// TODO
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.