0

Whats a "var"

2nd Jul 2017, 6:50 PM
Stas Benko
Stas Benko - avatar
3 Réponses
+ 5
There is no var in Java. If you didn't mean litteraly "var" and just meant variable, then by definition it is just something that stores a value. Like an int or String. int x; ^^ In general terms this is a variable of type int. But there is no var keyword in Java. If you meant Javascript, the keyword 'var' is short for 'variable', which declares (creates) a variable. A variable can later be used to retrieve whatever the variable is storing. var x = 15; alert(x); Output: 15. This should be covered in the Javascript course.
2nd Jul 2017, 7:14 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Variable
2nd Jul 2017, 7:10 PM
Zhuoyu Wang
Zhuoyu Wang - avatar
0
thank you
2nd Jul 2017, 7:18 PM
Stas Benko
Stas Benko - avatar