CODESANDBOX ODDITIES
Code Sandbox oddities observed while working on LogicRoom exercises
codesandbox.io does its best to give the impression of a locally running environment, but the abstraction is sometimes a bit leaky. Here's some weirdness (with possible fixes)
Delayed execution of console.log
The console.log statement is actually proxied via a server and executed at a later stage. That sometimes results in weird behaviours, as the value of some field on an object can be different when it is printed than when it was logged ... The fix is making something like this and using that instead: