Fork me on GitHub
Toggle navigation
ChaiScript
Examples
Playground
Cheatsheet
Docs
Support
Extras
Tweet
Tweet #ChaiScript
Interactive Playground
Loading…
Write ChaiScript code and run it directly in your browser using WebAssembly.
Input
// Welcome to ChaiScript! // Write your code here and click Run (or press Ctrl+Enter). def greet(name) { return "Hello, " + name + "!" } print(greet("World")) print(greet("ChaiScript")) // Math example def factorial(n) { if (n <= 1) { return 1 } return n * factorial(n - 1) } print("5! = " + to_string(factorial(5))) print("10! = " + to_string(factorial(10)))
Output
Run
Clear
Ctrl+Enter to run