parent property does not work

it says property can not read, undefined.