Searching...
Tuesday, 2 October 2012

JavaScript Variables

10:37 pm

    javascript variables

1.       Variables are used to storing data.
2.       A variable name can have alpha numeric characters and under score
3.       A variable name should start with letter o r underscore
4.       No space is allowed between the characters of a varialbe name.
5.       A variable name sshouldnot be a reserve keyword of javascript.
6.       Var script is used for declaring a variable name.
Var first_name
Var last_name
Var _age
Php                                                                                            java script
<?php                                                                      <script type=”text/javascript”>
$a=10;                                                                       var a=10;
$b=”india”;                                                              var b=”india”;
$c=$a+$b;                                                                 var c=a+b;
Echo  $c;                                                                   document.write(c);
?>                                                                                </script>
Output=10                                                             output=10india

0 comments:

Post a Comment

01 03 06 02 03a 04 05 7 8 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Click to see the code!
To insert emoticon you must added at least one space before the code.