News for hackers. Stuff that matters.
Re:Advanced console.log Tips and Tricks (2020) by metafunctor on Wednesday June 16, 2021 @04:05AM (#27526087)
That's... what asynchronous means. The call to console.log() will return before the console output is actually produced.
Re:Advanced console.log Tips and Tricks (2020) by MatthewMob on Wednesday June 16, 2021 @04:11AM (#27526117)
No. It means that when you invoke `console.log` in a browser it "logs" a reference to an object instead of serialising it.

This log is still synchronous, but when you expand it in the console its properties are dereferenced and may be different from when the original log was made. The log, however, is still instantaneous and synchronous.

Re:Advanced console.log Tips and Tricks (2020) by metafunctor on Wednesday June 16, 2021 @06:20AM (#27526846)
OK, agreed. That's an important distinction. The console log will synchronously receive a reference to an object; later if you expand something in the log window it shows you the current state.
Re:Advanced console.log Tips and Tricks (2020) by mjbrusso on Wednesday June 16, 2021 @07:05AM (#27527111)
I would say the argument is lazy evaluated.
Re:Advanced console.log Tips and Tricks (2020) by genezeta on Wednesday June 16, 2021 @04:32AM (#27526223)
To add to the MatthewMob's explanation, see this: https://imgur.com/a/vUTCumu
Re:Advanced console.log Tips and Tricks (2020) by voiper1 on Wednesday June 16, 2021 @05:28AM (#27526565)
Thanks! I figured it meant that, but nice to see it without having to mess around.