Just to make sure I'm on the right track...
function getADate() {
return new Date();
}
function foo() {
var bar=getADate();
alert( bar );
}
This doesn't work as one might expect because the date constructed by
getADate() is destroyed once the function returns, meaning that bar
is a reference to a destroyed object when alert() is called. Is that
correct?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
function getADate() {
return new Date();
}
function foo() {
var bar=getADate();
alert( bar );
}
This doesn't work as one might expect because the date constructed by
getADate() is destroyed once the function returns, meaning that bar
is a reference to a destroyed object when alert() is called. Is that
correct?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Comment