I get the error:
Uncaught TypeError: Cannot read property 'interval' of undefined
When I try to initialize an object like this:
var loop = {
interval: 5 * 1000,
maxInterval: loop.interval * 12
};
So instead I have to do it like this:
var loop = {
interval: 5 * 1000
};
loop.maxInterval = loop.interval * 12;
Is there a better way of doing this?