Why does typing {} = = [] in the Chrome console report an error, while {} = = {} does not?

clipboard.png

Jun.23,2022

both writing methods are ambiguous, and both will report errors on firefox and report the same mistakes. Because { can be thought of as the beginning of a statement block, or it can be considered the beginning of the literal quantity of an object.

{ is usually parsed as the beginning of a statement block, while chrome {} = = {} does not report an error because chrome has made a little optimization, such as

.
  

you propose a bug to the chrome team

Menu