Created
May 23, 2025 20:27
-
-
Save temperlang-play/14030a46ccdcd8244c7c1026dedbadf3 to your computer and use it in GitHub Desktop.
Code shared from the Temper Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Rectangle( | |
public width: Float64, | |
public height: Float64, | |
) { | |
public area(): Float64 { | |
width * height | |
} | |
public toString(): String { | |
"Rec: ${width} x ${height}!!" | |
} | |
} | |
let rectangle = { width: 1.25, 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