console log state in real time code example Example: console.log object at current state console.log(JSON.parse(JSON.stringify(obj)));