Before using a variable in a JavaScript program it must be declared; either by you, or implicitly by JavaScript. If you assign a value to an undeclared variable JavaScript will declare it for you but that variable then becomes global, so it's best to explicitly declare it.
var name; name = "Homer Simpson"; - or - var name = "Homer Simpson";
![]() |
This site best viewed with a browser |
| Warning: This is a Debian centric site and MAY contain peanuts. | |
| Many thanks to Debra Lynn and Ian Murdock for making Debian possible | |
| First created Jun 15, 2010 ~ Last revised June 15, 2010 |