0

Anyone to help me figure out why the second function is not working

https://code.sololearn.com/clBjc6TOP3bj/?ref=app

2nd Jan 2022, 6:50 AM
bernard
bernard - avatar
2 Réponses
+ 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) }
2nd Jan 2022, 6:53 AM
A͢J
A͢J - avatar
+ 2
A͢J thanks
2nd Jan 2022, 6:59 AM
bernard
bernard - avatar