New course! Every coder should learn Generative AI!
Try a free lesson0
Confusion about return types?
What would happen if I use a non-void return datatype in a function yet it don't return any value?
3 Answers
+ 4
⚠️ compile error
+ 2
duplicate question
+ 1
Example?
If you return something like it or String it will show an error saying that it is expecting a return type.
Only in void you don't have to use the return key.