(Solved) Kotlin code doubt | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

(Solved) Kotlin code doubt

Hi guys, I'm new to coding plz help on this codes Why below code shows no output https://code.sololearn.com/cVO5R8ZSlx2Z/?ref=app But following code shows output i desired https://code.sololearn.com/cIFtMq68YpoX/?ref=app Only difference between two codes is 👉👉👉 { } Plz help guys

28th Sep 2019, 12:41 PM
KAAMIL AHAMADH S
KAAMIL AHAMADH S - avatar
1 Answer
+ 1
The first declares a function that isn't called so never executed. If you add () on the end of the line, it will be called.
28th Sep 2019, 4:22 PM
John Wells
John Wells - avatar