Variable is only name of memory location of your system hard disk.
Variable occupy space in memory.
It is called data container.
Variable value can be replace.
Variable name can not start with number.
Special characters can not use in variable name But Underscore( _ ) and dollar($) can be use.
White space can not be use in variable name.
Do not use keywords for variable name.
You can declare a JavaScript variable with the var keyword.
Syntax
var vriableName = vlaue;
example:
var a = 101;
var and let are both used for variable declaration in javascript but the difference between them is that var is function scoped and let is block scoped.
Variables declared with the var keyword cannot have Block Scope. Variables declared inside a block {} can be accessed from outside the block.
Variables declared with the let keyword can have Block Scope. Variables declared inside a block {} cannot be accessed from outside the block.
Comsysapp.com is an educational website. Students and software developers can learn programming language tutorials. Comsysapp is very useful for beginners and professional developers. Comsysapp provides tutorial in easy language. Comsysapp.com has focus on simplicity.
Comsysapp.com provides free tutorials like c, html, css, etc. All tutorials are free for beginner and professionals.
comsysapp.com is not responsible for any mistake. We are not responsible if information made available on our website is incomplete or invalid. But comsysapp.com always try for zero-zero mistake.
comsysapp.com does not collect any data from users. We use Google AdSense advertising on our website. We never ask personal or private information.
copyright © 2023