0
When can we use the type void
2 Answers
+ 3
You use it when you want your function to return nothing. For example, if you want your function to print out a text only whenever your function gets a certain number, you use void since it the function doesn't 'give' anything to the system, it outputs texts.
+ 1
thx