Hi @william1, that code works for me if I just copy / paste it to the browser console; however
you forgot to declare both variables AFAICT. This will throw an error in strict mode; and since both stackblitz and codesandbox are module-based, and modules are in strict mode by default, that code won’t work in either without proper declarations. The error message you’ll get will be different from what you posted here though.