-
Notifications
You must be signed in to change notification settings - Fork 1
Data Types
Zahir Hadi Athallah edited this page Jul 10, 2022
·
5 revisions
// Examples :
enum theData (
"LOW",
"MEDIUM",
"HIGH"
)
// the default value of the enums is 1
// you can also add the value for the enums
// Examples :
enum theData (
{ LOW: 2 },
{ MEDIUM: 3},
{ HIGH: 4}
)
// Examples :
interface Vehicle (
name: String,
price: Number
)
val myCars :
this.name = "Honda Jazz",
this.price = 5000000000
getInterface(Vehicle, createProperty)
write(myCars.name)
write(myCars.price)
// readonly data is useful for creating data that can only be retrieved, but cannot be changed
// Examples :
readonly myData (
name: "Zahir"
)
myData.prop = "Jimmy"
// Throws an Error
// Define is useful for define a object with Advanced Options
// Examples :
define myData: myObj (
readonly: false,
value: "Zahir",
enums: false,
config: true
)