Morgan Stanley interview question

How Javascript inheritance methods work.