Utility Functions
RTR provides several built-in utility functions for common operations.
log
Outputs a message to the console.
log("Hello, World!"); /* Outputs: Hello, World! */
log("Value:", 42); /* Outputs: Value: 42 */
return
Exits a function and returns a value.
greet = (name)~{
return(join("Hello, ", name));
}
error
Throws an error with the specified message.
if (age < 0) {
error("Age cannot be negative");
}
Last updated