For [] + {}, the valueOf() operation on [] doesn’t produce a simple primitive and so the toString() method is invoked which results in [] being coerced into "". Since one operand of this + operation is a string, the other operand, {} is also coerced to a string, producing "[object Object]".
For {} + [] , however, {} is interpreted as a stand-alone empty block (semicolons aren’t needed to terminate them) and + [] as an expression which results in the explicit coercion of [] to a number value, 0. It might as well be represented as : {}; +[] .
Booleans don’t play nice when compared with other primitives; they give unexpected results
Solutions:
We often need to check if two object references point to the same object and employ the == operator to achieve that effect
name or window.name is a reserved keyword. When name is set to any value, it is automatically stringified, i.e, the toString() method is called on it . window.name gets/sets the name of the window. This only happens for var declarations and not for let declarations since let variables do not attach themselves to the window object.
undefined and null coerce to each other when compared with ==
A monolithic architecture means that your app is written as one cohesive unit of code whose components are designed to work together, sharing the same memory space and resources.
A microservice architecture means that your app is made up of lots of smaller, independent applications capable of running in their own memory space and scaling independently from each other across potentially many separate machines.
Monolithic Pros:
Monolithic Cons:
Microservice Pros:
Microservice Cons:
Positive attitudes toward microservices, despite the higher initial cost vs monolthic apps. Aware that microservices tend to perform and scale better in the long run.
Structure the app so that services are independent from each other at the code level, but easy to bundle together as a monolithic app in the beginning. Microservice overhead costs can be delayed until it becomes more practical to pay the price.