Java script variables


Im confused as to how variables work? and how to implement them? this is my first language, im not much of a coder, but as an IT engineer you got to have a hand in everything, If possible please explain as clearly as possible!

Thank you


Variables are quite easy to learn when you understand how they really work.

This is a variable,

my_name = "Any String"

How to create a variable is just by typing any word and an equal sign = but it must have a value that it stores whether a string, number or list.


ok, im a little confused, in the Coarse it asks talks about
var variableName = ****
Do i not need the var?

and what does it actually do? just save a value for latter on ?


No you don't need to include it, but for good practice and to help you understand the code you can include it. :slight_smile:


Ok cool, and what does console.log() have to do with var aswell? does it just display the value?:


console.log() is like the print statement in another programming languages. It has no relation to var. :grin:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.