---
title: "Discussion on \"The most helpful thing with the modulo operator\" | Hashnode"
description: "Discussion on \"The most helpful thing with the modulo operator\". Create circular-like functionality with arrays."
url: "https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The most helpful thing with the modulo operator](https://tigerabrodi.blog/the-most-helpful-thing-with-the-modulo-operator?utm_source=hashnode&utm_medium=feed)

Create circular-like functionality with arrays.

Apr 9, 2024 · 4 min read · tigerabrodi.blog  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#tips](https://hashnode.com/tag/tips)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

  
[View profile](https://hashnode.com/@tigerabrodi)

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses 3

Markdown supported · ⌘↵ to post

[Simon AKKAD](https://hashnode.com/@Syyms)

[Apr 10, 2024](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0/comment/6616cfc1909485259a500646)

greate

[Philip Birk-Jensen](https://hashnode.com/@BirkAndMe)

[Apr 10, 2024](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0/comment/661641c26c00e013ce8c5d14)

Great writeup.

With my primary focus being on websites, I tend to use modulos for zebra stripes with an even/odd class. Although I've used it for circular functionality in slides a couple of times as well.

[Thirumalai](https://hashnode.com/@tthirruu)

[Apr 9, 2024](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0/comment/6614f09059736219ea279a83)

this is helpful for the rotation of arrays too where we do

int\[\] temp = temp\[(i + rotations) % arr.length\] = arr\[i\]

Sorry, I have used Java im super comfortable with java for problem solving because i have been using this for a year

anyways great blog
