Skip to content

Latest commit

 

History

History

14-arithmetic-operators

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Lesson 14: Arithmetic operators

+, -, *, /, %, ** and increment/decrement.

What you'll learn

  • % is remainder (modulo)
  • ** is exponentiation (2 ** 10)
  • ++ / -- increment/decrement (prefer += 1 for clarity)
  • + is also string concat — watch types

Example

See examples/.

Exercise

Write isLeapYear(year) using %.