PWM on js