Hi there,
Unlike the Processing.org inheritance example the P5.js doesn't actually implement class inheritance. Instead two separate classes are defined, each effectively defining their own separate spin methods. Whereas, the processing.org example, both the classes SpinArms and SpinSpots extend the Spin class respectively.
Cheers