The Ganja syntax notes notebook from tmcw comments on this problem as well:
The same goes for pretty much all JavaScript syntax: the ganja interpretation is different. Arithmetic is overloaded as vector operations, negation is the dual, bit-shifting operators mean a dot product instead.
This has meant – for me in particular – that when I’m writing a lot of ganja-related code, I turn off Prettier support in Observable - which is guaranteed to format your JavaScript into equivalent JavaScript, but that formatting may change the meaning of said JavaScript in Ganja.