Overlapping Rectangles solved in JavaScript

I more terse version than my PHP code.  Note, that the variable data
type had to be specified to avoid JavaScript's "unique" type coercion.