I can see that you are trying the UPM example: adafruitms1438.js. The example spins the motor 3 seconds in one direction and then it reverses another 3 seconds. I read through your code and I noticed that you only changed the speed of the reversing part. Do you think that you could have missed this?
Anyway, if you encounter any other issue you may have a more accurate answer by contacting the example's creator. His email can be found on the link above.
I have not overlooked this. The change was intentional. The example's creator is unsure as to the cause of the problem. What should be done now?
The source of the problem has been found. The library used to control the pwm had an issue. This is from the patch documentation:
There was a bug in the setMotorSpeed() method that did not clear the
'FullOn' bit in the register used for PWM, causing full power to be
applied all the time no matter the PWM duty cycle setting.
I was informed the patch will be in the next release of UPM. I don't know for certain what the current version of UPM is but I am going to guess it is version 0.3.2.