0Pricing
Mojo Academy · Lesson

Int, Float, and Bool

Work with Mojo's numeric and boolean types.

Values Have Types

Every value belongs to a type that says what it is and what you can do with it. Three core types start you off.

Int for Whole Numbers

An Int holds whole numbers like counts and indexes, with no fractional part at all.

var count = 42

All lessons in this course

  1. Declaring Values with var
  2. Int, Float, and Bool
  3. Strings and Text
  4. Type Annotations That Help
← Back to Mojo Academy