Join Exercism’s MoonScript Track for access to 69 exercises with automatic analysis of your code and personal mentoring, all 100% free.
class Greet
new: (@who) =>
__tostring: => "Hello, #{@who}!"
print Greet thing for thing in *{'Me', 'You', 'World'}
Get better at programming through fun, rewarding coding exercises that test your understanding of concepts with Exercism.
Mark all the flowers in a garden.
Determine whether a given year is a leap year.
Determine if a number is an Armstrong number.
MoonScript's expressive syntax means cleaner, more readable code with less boilerplate than Lua.
Compiles to Lua, making it easy to embed into apps, games, or services.
Benefits from Lua's fast VM (and LuaJIT), ensuring rapid execution of your compiled code.
Like Lua, it's small. The compiler is light, and generated code is efficient.
Supports functional programming with features like comprehensions and implicit returns.
Concise syntax and powerful features boost developer productivity for rapid iteration.
Every language has its own way of doing things. MoonScript is no different. Our mentors will help you learn to think like a MoonScript developer and how to write idiomatic code in MoonScript. Once you've solved an exercise, submit it to our volunteer team, and they'll give you hints, ideas, and feedback on how to make it feel more like what you'd normally see in MoonScript - they'll help you discover the things you don't know that you don't know.
Learn more about mentoringThe MoonScript track on Exercism has 69 exercises to help you write better code.
See all MoonScript exercisesThe best part, it’s 100% free for everyone.
Join the MoonScript track