Skip to content

Enjoy Kaizen

JavaScript can’t do this

++this.ring_pointer %= this.sample_width;

I want to firstly increment, and then take the modulus as the value of my variable.

Instead:

this.ring_pointer = ++this.ring_pointer % this.sample_width;

Leave a Reply

Your email address will not be published. Required fields are marked *