oldskool
Oldie but a goodie
- Messages
- 1,760
- Location
- Maine, USA
^ If you are using a compiler. For Javascript you can use Notepad, and some people do. Javascript doesn't get compiled, like the other languages mentioned. The browser "renders" it, but Javascript doesn't get compiled. It is not a stand-alone application, just code used within HTML in the form of a script.
^^ Yes the moral of the thread is be careful, but don't let it end like that. I was just trying to think of some obvious mistakes.
^ Yes that would be an error, if you try to say:
If (someVariable = someOtherVariable) {
// the code here wouldn't work if, if "someVariable were equal
//to 5 and someOtherVariable = 5 as well.
}
That is because the code is NOT COMPARING the two values. It is trying to make
someVariable receive the value of someOtherVariable, not compare the two.
What would be needed in this case would be the == .
So you are wrong, Soulphire. Sorry. Unless you can show me what you mean, with an example.
^^ Yes the moral of the thread is be careful, but don't let it end like that. I was just trying to think of some obvious mistakes.
Things that aren't technical errors, but aren't what you want to do (like the = and == functions)
^ Yes that would be an error, if you try to say:
If (someVariable = someOtherVariable) {
// the code here wouldn't work if, if "someVariable were equal
//to 5 and someOtherVariable = 5 as well.
}
That is because the code is NOT COMPARING the two values. It is trying to make
someVariable receive the value of someOtherVariable, not compare the two.
What would be needed in this case would be the == .
So you are wrong, Soulphire. Sorry. Unless you can show me what you mean, with an example.