"demo" is from <https://kotlinlang.org/docs/refere...
# announcements
c
"demo" is from https://kotlinlang.org/docs/reference/typecasts.html Can anyone please let me know why "demo2" is not working?
e
Demo2 tries to execute print(x.length) regardless if x is string or not, need to put it in an if statement
d
What behaviour do you expect in
demo2
if
x
is not a
String
? I think you want
is
->
as
.
c
Thanx. That was it. Argh.