camelCase
The Case of the Mysterious Camel.
- Reaction score
- 362
When you pass a variable to a function in Javacript, how do you know whether you're passing by value or reference?
Is there a way to control whether you're passing something by reference, pointer or value?
[EDIT]
Also, an unrelated question:
Does Javascript have any class support?
If it does, does it support inheritance?
Like,
Just asking for no particular reason.
I've never *really* found a need for all this, I just wanted to know.
And I never think about references and values when using Javascript, I just debug and fix things if anything goes wrong.
Is there a way to control whether you're passing something by reference, pointer or value?
[EDIT]
Also, an unrelated question:
Does Javascript have any class support?
If it does, does it support inheritance?
Like,
Code:
class myClass : public someElement {
public:
myClass (int i=0) : myInt(i) {}
~myClass () {}
protected:
int myInt;
};
Just asking for no particular reason.
I've never *really* found a need for all this, I just wanted to know.
And I never think about references and values when using Javascript, I just debug and fix things if anything goes wrong.