Problem with setTimeout and setInterval
Posted: 12 Jul 2014 00:37
I have been using setInterval and setTimeout with no problems until today. I tried adding another setTimeout to my main.js file and it just would not run.
My only console output is timeout 2. Am I doing something wrong? Is there a workaround?
Code: Select all
var console = {
log: debugPrint,
warn: debugPrint,
error: debugPrint,
debug: debugPrint,
logJS: function() {
var arr = [];
for (var key in arguments)
arr.push(JSON.stringify(arguments[key]));
debugPrint(arr);
}
};
setTimeout(function() {
console.log("timeout 1");
}, 1000);
setTimeout(function() {
console.log("timeout 2");
}, 1000);