27 lines
459 B
Plaintext
27 lines
459 B
Plaintext
let def = "DEF"
|
|
let s = f"abc {def} {"ghi"}"
|
|
print(s)
|
|
|
|
class Person {
|
|
init(name) {
|
|
this.name = name
|
|
}
|
|
|
|
greet(person) {
|
|
if person == null {
|
|
print(f"Hello, I'm {this.name}")
|
|
} else {
|
|
print(f"Hello {person.name}, I'm {this.name}")
|
|
}
|
|
}
|
|
}
|
|
|
|
fun meet(person1, person2) {
|
|
person1.greet(null)
|
|
person2.greet(person1)
|
|
}
|
|
|
|
let alice = Person("Alice")
|
|
let bob = Person("Bob")
|
|
|
|
meet(alice, bob) |