You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
189 B
19 lines
189 B
14 years ago
|
// references with functions
|
||
|
|
||
|
var a = 42;
|
||
|
var b;
|
||
|
b[0] = 43;
|
||
|
|
||
|
function foo(myarray) {
|
||
|
myarray[0]++;
|
||
|
}
|
||
|
|
||
|
function bar(myvalue) {
|
||
|
myvalue++;
|
||
|
}
|
||
|
|
||
|
foo(b);
|
||
|
bar(a);
|
||
|
|
||
|
result = a==42 && b[0]==44;
|