I am trying to accomplish something like this.
/* Code start */
function getCurrentTime()
{
var date = new Date(),
time = date.getTime();
return time;
}
var jsObject = {
"imageOne":"SomeText"+getCurrentTime(),
"imageTwo":"someOtherText"+getCurrentTime()
}
setInterval(function(){
console.log(jsObject.imageOne);
}, 3000);
/* Code end */
Each time the timer is executed I need to execute getCurrentTime() and get the latest time. How do I do it?