0
Anyone to help me figure out why the second function is not working
2 Answers
+ 3
bernard
String should be inside double quotes ""
And why there is $ before variable name? firstname and lastname
fun main(args: Array<String>) {
println(add(5,7))
println(fullname("Bernard", "Ocran"))
}
fun add(num1: Int,num2: Int): Int{
return(num1.plus(num2))
}
fun fullname(firstname: String, lastname: String): String{
return (firstname + lastname)
}
+ 2
AĶ¢J thanks