Apiture interview question

Write the observer pattern in any language.