0
Why code isn’t running
class Person { var name = "" var age = 0 init(){ name = Emmanuel age = 26 } } var a = Person() a.name b.age
7 Respuestas
+ 1
class Person {
var name = ""
var age = 0
init(){
name = "Emmanuel"
age = 26
}
}
var a = Person()
print(a.name, a.age)
+ 1
1. Strings must be quoted. Check the value assigned to name.
2. There is no "b" object. Check the last line.
3. Are "a.name" and "b.age" valid swift statements?
0
Still
0
Take a closer look at the print output.
0
I dint get it
0
Thank u !!!