For AI agents: Documentation index at /llms.txt

Skip to content

Whitespace

Whitespace characters (spaces, tabs, newlines) are generally ignored in Motoko, but are essential for separating syntax components like keywords and identifiers. Proper use of whitespace enhances code readability.

persistent actor Counter{var x : Nat = 0; public func inc(): async Int{x+1; }};
persistent actor Counter {
var x : Nat = 0;
public func inc() : async Int {
x + 1;
};
};