---
title: "Discussion on \"Modulo Operation\" | Hashnode"
description: "Discussion on \"Modulo Operation\". Take an example as below.\n5 % 2 => 1\n\nThis is an example of modulo operation. 5 is called dividend, 2 is called divisor and the result 1 is called remainder.\nIn JavaScript, we can do modulo operation as below.\n> 5 % 3\n2\n\n> -5 % 3\n-2\n\n> 0 % 3\n0\n\n> 3 %..."
url: "https://hashnode.com/posts/modulo-operation/62bd0435de0d0a065f4f6d1a"
---

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

Discussion

# [Modulo Operation](https://blog.yaox023.com/modulo-operation?utm_source=hashnode&utm_medium=feed)

Take an example as below. 5 % 2 => 1 This is an example of modulo operation. 5 is called dividend, 2 is called divisor and the result 1 is called remainder. In JavaScript, we can do modulo operation as below. > 5 % 3 2 > -5 % 3 -2 > 0 % 3 0 > 3 %...

Jun 30, 2022 · 2 min read · blog.yaox023.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[yaox023](https://hashnode.com/@yaox023)

@yaox023 · Tokyo, Japan

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

A Software Developer in Tokyo

## Responses 1

Markdown supported · ⌘↵ to post

[trav](https://hashnode.com/@techsavvytravvy)

[Jun 30, 2022](https://hashnode.com/posts/modulo-operation/62bd0435de0d0a065f4f6d1a/comment/62bd1c3dde0d0a065f4f6fec)

The modulo operation is definitely useful—it would be nice to see it explained in depth with some more context to accompany the code samples. It’s also worth noting that not all programming languages calculate modulo the same way, so it's important to know the quirks of the language you're using.
