Skip to content

Instantly share code, notes, and snippets.

@furenku
Created November 2, 2021 16:40
Show Gist options
  • Select an option

  • Save furenku/ce55b1d3792fded7752c9beb64a0aa5b to your computer and use it in GitHub Desktop.

Select an option

Save furenku/ce55b1d3792fded7752c9beb64a0aa5b to your computer and use it in GitHub Desktop.
operador modulo
let a
let b
let c
a = 0
b = 4
// operador módulo
// c = a % b
console.log( 0, 0 % b + 1 )
console.log( 1, 1 % b + 1 )
console.log( 2, 2 % b + 1 )
console.log( 3, 3 % b + 1 )
console.log( 4, 4 % b + 1 )
console.log( 5, 5 % b + 1 )
console.log( 6, 6 % b + 1 )
console.log( 7, 7 % b + 1 )
console.log( 8, 8 % b + 1 )
console.log( 9, 9 % b + 1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment