Making sense of var | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Making sense of var

What's the point of using var if you can only define it in the field? When I'm not sure of the type of the value I'm assigning to or something?

28th Dec 2016, 9:59 AM
Carl Yao
1 Answer
+ 5
In the future where you deal with more libraries with more datatypes, you will find this keyword useful to help you find suitable datatypes.
28th Dec 2016, 10:05 AM
Wen Qin
Wen Qin - avatar