Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

Javascript: Create a Variable



Variables: Variables are used to store values that can be used to other parts of the programme.Variable names are identifier.

Rules for Variable Names:
1. Variable name can be begin with alphabates (A-Z or a-z).
2. No commas or blank are allowed within a variable.
3. No special symbol other than an underscore(sal_a) can be used in a variable name.
4. A variable name is any combination of alphabates, digits or uderscore.



Example:

<html>
<head>
<title>Create a Variable</title>

<script language="javascript">
var Variablename=value;
var x;
var x,y;
var x=123;
var y="abcd";
var x=23,y="asd";
</script>

</head>
</html>

No comments:

Post a Comment

Google