+ 2

Please guys how do I get to master JavaScript variables?

I get really confused applying them

8th Jul 2017, 9:05 AM
Precious
Precious - avatar
3 odpowiedzi
+ 5
Javascript variables are easy actually, because you don't need to declare them with their data type. They can be of any data type you want them to be. All you need to really know is what your naming convention will be. Like name the variable something relating to what it stores, else it's going to be confusing. Example (Javascript): var name; name="Gavin"; alert(name); name=26; alert(name); name=1.82; alert(name); name=true; name?alert("true"):alert("false"); //Try this code out //Only name="Gavin" makes sense, the others don't.
8th Jul 2017, 9:15 AM
Ghauth Christians
Ghauth Christians - avatar
+ 2
thanks for the advice hehe
10th Jul 2017, 7:43 AM
Krieg7
Krieg7 - avatar
- 2
Well I think with time we'll get to know... Veterans here please contribute.
8th Jul 2017, 9:06 AM
Precious
Precious - avatar