let counter1 = 0
let counter2 = 0
let counter3 = 0
console.log("Start iteration")
console.time("Time required")
// First heavy iteration
for (let i = 0; i < 1000; i++) {
counter1 += 1
//setTimeout(function() {console.log("AA")}, 2000)
// Second heavy iteration
for (let i2 = 0; i2 < 1000; i2++) {
counter2 += 1
// Third heavy iteration
for (let i3 = 0; i3 < 1000; i3++) {
counter3 += 1
}
}
}
console.log("Iteration was successful")
console.timeEnd("Time required")
console.log('The value of `counter1` is: ' + counter1)
console.log('The value of `counter2` is: ' + counter2)
console.log('The value of `counter3` is: ' + counter3)