Skip to content

Instantly share code, notes, and snippets.

@temperlang-play
Created June 3, 2025 22:40
Show Gist options
  • Save temperlang-play/f8bda19096ead350b3e512ac273c5f01 to your computer and use it in GitHub Desktop.
Save temperlang-play/f8bda19096ead350b3e512ac273c5f01 to your computer and use it in GitHub Desktop.
Code shared from the Temper Playground
export class Rectangle(
public width: Float64,
public height: Float64,
) {
public area(): Float64 {
width * height
}
public toString(): String {
"Rectangle: ${width} x ${height}"
}
}
let rectangle = { width: 1.5, height: 2.0 };
console.log("${rectangle}");
console.log("Area: ${rectangle.area()}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment