|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I have some questions about Javascript.
I have a statement that does not work, Why? var 99 = "favorite number" document.write("What is your" + 99 + "?") Dennis |
|
#2
|
||||
|
||||
|
1dennis, your question was moved to its own thread in the Javascript forum... It in no way related to the PHP object thread...
As with most languages, Javascript does not support variable names that are numbers... they can contain numbers [usually on the end of the variable name], but need numbers as well. try something like: var prompt = "favorite number"; document.write ("What is your " + prompt + " ?"); |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Variable name question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|