Whitespace

MoonScript is a whitespace sensitive language. This means that instead of using do and end (or { and }) to delimit sections of code we use line-breaks and indentation.

This means that how you indent your code is important. Luckily MoonScript doesn’t care how you do it but only requires that you be consistent.

An indent must be at least 1 space or 1 tab, but you can use as many as you like. All the code snippets on this page will use two spaces.

Should you happen to mix tabs and spaces, a tab is equivalent to 4 spaces. I shouldn’t be telling you this though because you should never do it.

results matching ""

    No results matching ""