I have a foo object as follow :
var foo =
{
"timer" :
{
"hours" : 0,
"minutes" : 0,
"seconds" : 0,
"time" : new Date(1970, 0, 1, foo.timer.hours, foo.timer.minutes, foo.timer.seconds).getTime()
}
};
The problem is that foo.timer.hours, foo.timer.minutes and foo.timer.seconds properties in new Date() aren't recognized because javascript console in chrome browser displays that :
Uncaught TypeError: Cannot read property 'timer' of undefined
So why foo.timer.hours, foo.timer.minutes and foo.timer.seconds properties in new Date() aren't recognized ?