0๐
โ
&&
is called a logical AND operator and in this case it is used to avoid errors. The MDN docs state that:
If
expr1
can be converted totrue
, returnsexpr2
; else, returnsexpr1
.
This means that if variable google
is not properly initialized it will return the falsy value instead of throwing an exception (e.g Cannot read property โmapsโ of undefined/null).
Source:stackexchange.com