The Remainder Operator in JavaScript | Modulo %

Veröffentlicht am: 23 April 2018
auf dem Kanal: dcode
37,388
564

The Remainder Operator (%) in JavaScript allows you to find the remainder of a division of two numbers - much similar to the modulo operator in many other languages. It can be used for the same purpose of finding the remainder as it uses the built in modulo function.

It is also extremely useful for limiting a large number (or converting it) into a smaller one with a maximum you specify. For example if you wanted to reduce 500 down to a maximum of 7, you can do this easily using the remainder operator.

In this video I take you through a basic example of the operator as well as it's uses to limit a number down.

For your reference, check this out:
https://developer.mozilla.org/en-US/d...)

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!


Auf dieser Seite können Sie das Online-Video The Remainder Operator in JavaScript | Modulo % mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer dcode 23 April 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 37,388 Mal angesehen und es wurde von 564 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!