Javascript implementation

Hm,.....why?