this join the union type discussion i think
fun timeTwo(number: Int|String|Double) {
if (number is Int) {
return number * 2
}
else {
return number.toInt()
}
}
this join the union type discussion i think
fun timeTwo(number: Int|String|Double) {
if (number is Int) {
return number * 2
}
else {
return number.toInt()
}
}