+ 5
What does var mean ?
plz explain in easy words I am just a starter and also tell when and how to use it plz
6 Respostas
+ 6
var == variable
int == integer.
+ 3
var is keyword to define variables like va a ;
which holds any type of constants . ^ ^
+ 1
There is no var keyword in C++
+ 1
Sry wanted to write.. C#
don't say that itcis not used in it
+ 1
I think it is in JavaScript.
var means you declare a variable to store data(string, int, char etc ).
+ 1
Oh ok ! In that case, var is an implicitly type declaration (like auto in C++)
It means that the type will be deduced by the compiler instead of you having to know it (can help for Container (like array) and foreach statement)
Using it is not good if you know the type of data that will be store in your variable