Genpact interview question

Basic javascript- hoisting, bubbling etc and in angular- directives, pipes