Implements JS code more compact