Changes

Jump to: navigation, search

JavaScript Variable Types

77 bytes added, 18:54, 20 April 2007
no edit summary
</pre>
JavaScript is also mcuh more flexible than many other programming languages. With languages such as Java a variable must be declared to be a particular type when it is created and once created, the type cannot be changed. This is referred to as ''strong typing''. JavaScript, on the other hand, allows the type of a variable to changed at any time simply by assigning a value of a different type(better know nas ''loose typing''). The following example is perfectly valid use of a variable in javaScript. At creation time, the variable is clearly of type ''number''. A later assigment of a ''string'' to this variable changes the type from ''number'' to ''string''.
<pre>

Navigation menu