I am just getting started with Realm so I was trying the simple example in the Realm documentation.

```
class Dog: Object {
    dynamic var name = ""
    dynamic var age = 0
}

// create Dog object and set its properties
var myDog = Dog()
myDog.name = "Rex"
myDog.age = 5

print("name of dog: \(myDog.name)")
print("age of dog: \(myDog.age)")

// Get handle to default Realm
let realm = try! Realm()

// Add to the default Realm inside a transaction
try! realm.write {
    realm.add(myDog)
}

```

But i'm getting the following build errors.

1. Expected declaration (for the line myDog.name = "Rex"
2. Consecutive declarations on a line must be seperated by ''' (for the line try! realm.write