Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Variables

In Kiwi, variables are immutable by default.

Syntax

#![allow(unused)]
fn main() {
// Since Kiwi is new, we use 'rust' highlighting 
// as a placeholder until we add custom highlighting
let name = "Kiwi";
let count = 10;
}

To make a variable mutable, use mut:

#![allow(unused)]
fn main() {
let mut x = 5;
x = 6;
}